IFrame handling - Xceptance/neodymium GitHub Wiki

The Neodymium documentation has been relocated. You can now find the complete documentation here, and the specific IFrame Handling page here.

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();
⚠️ **GitHub.com Fallback** ⚠️