Locating target windows and iFrames

WebDriver enables the developers to switch easily between the multiple windows or frames an application loads in. For instance, when you click on the Internet banking link on a bank web application, it will open the Internet banking application in a separate window. At this point, you may want to switch back to the original window to handle some events. Similarly, you may have to deal with a web application that is divided into two frames on the web page. The frame on the left may contain navigation items, and the frame on the right displays the appropriate web page based on what is selected in the frame on the left. Using WebDriver, you can develop test cases that can easily handle such complex situations. ...

Get Selenium WebDriver Practical Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.