IFrame Handling

Handling iFrames in Neodymium.

iFrame handling

An iFrame is used to display a webpage within a webpage. Sometimes it is necessary to access the contained elements for test automation. To do so we have to switch frame. For Selenide the syntax looks like this.

switchTo().frame($("#frame"));

If you finished your work within the iFrame you need to switch back to the main frame to execute any actions there. You could do this with the function above or you can use the following. It will always bring you back to the main frame.

switchTo().defaultContent();
Last modified December 14, 2025: Split quick start (75a2209b)