Automating Iframes

An IFrame (Inline Frame) is an HTML document embedded inside another HTML document on a website. The IFrame HTML element is often used to insert content from another source, such as an advertisement, into a Web page.

An inline frame is marked up as follows:


<iframe src="http://www.w3schools.com"></iframe>


In Webdriver how do we automate iframes ?

First we need to switch to frame 
then execute the scripts and later switch back to main screen using "defaultContent"

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.