Focus is lost on an HTML element if you click in Chrome's developer tools window

6,784 views
Skip to first unread message

Arthur

unread,
Aug 25, 2016, 12:45:19 AM8/25/16
to Chromium-discuss
Hello,
I have quite a basic issue right now. I need to inspect the HTML of a page to find the HTML of a specific element (textbox in this case) on it. However, this text box changes when I click on it (ie. the HTML changes). The problem is that I need to get the HTML of the element when it has been clicked on, but when focus is lost from it, the HTML changes back to what it originally was. Because of this, when I click on the element and then click the arrow to expand the HTML element in the console, focus is lost, and the HTML changes back to what it originally was.

Is there a way to either keep focus on the textbox while clicking in the console/inspection window, or copy the entire HTML of the current page onto the clipboard, or a file? Even "Inspect Source" disappears when focus is in the textbox. I would prefer not to use Selenium to dump the HTML of a page into a file or into output.

Thanks

PhistucK

unread,
Aug 25, 2016, 12:47:58 AM8/25/16
to arthu...@replicon.com, Chromium-discuss
Does pressing F8 first help (while the Developer Tools feature is open, of course)?
It pauses the JavaScript code, which I assume is the code that changes the HTML. Then you can focus on the Developer Tools feature and inspect whatever you want.
Otherwise, you can put console.log(thatElement.outerHTML) in your event listener.


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Arthur

unread,
Aug 25, 2016, 11:35:07 AM8/25/16
to Chromium-discuss, arthu...@replicon.com
Pausing the javascript using F8 actually does the trick. Thanks!


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Reply all
Reply to author
Forward
0 new messages