Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE 11 Developer Tools - Focus in IFRAME?

In the console of the Developer Tools in Chrome, the 'focus' can be changed to an IFRAME using the dropdown selector, shown here:

Developer Tools in Chrome

How can that be done in Internet Explorer 11, in the F12 Developer Tools?

(I know that the contents of IFRAMEs can also be accessed using frames[0]....)

like image 473
Glen Little Avatar asked Dec 06 '13 20:12

Glen Little


People also ask

How do I permanently set Emulation mode in ie11?

Select Edge (Default) from the Document mode drop down. Select Default from the User agent string drop down. In the upper left corner, click the Persist Emulation Settings icon to save your selections. A message, Persist Emulation settings enabled, is displayed when you hover over the Persist Emulation Settings button.

How do I make IE document mode default?

Open the registry editor using regedit.exe and follow the below mentioned paths to find the configuration in registry. Delete the REG_DWORD value iexplore.exe. Now close the browser and relaunch the website using Internet Explorer 11, it will default to Edge as Document Mode. Highly active question.

How do I use Devtools in IE?

To access IE Developer Tools, you launch Internet Explorer and press F12 on your keyboard or select “F12 Developer Tools” on the “Tools” menu. This opens the developer tools inside the browser tab.


2 Answers

In IE from versions 9 onwards you can use the cd() command in the console to change the frame targeting you need to pass in a reference to the frame.

cd(window.frames[0])
like image 171
Andy Sterland Avatar answered Sep 29 '22 01:09

Andy Sterland


To move focus to the top window, use:

cd()

and to move to the first iframe, use:

cd(frame[0])

Seems like you cannot use cd(top.frame[1]) to move to a sibling frame. But if iframes are nested, can use cd(frame[0]) to move into the first one, then cd(frame[0]) again to move in the nested one.

It is nice that immediately after typing cd(frame[x]) the console echos back: Current window: www.server.com/path/page.aspx showing you the current frame's source URL.

like image 24
Glen Little Avatar answered Sep 29 '22 02:09

Glen Little