Locating target windows and Frames

WebDriver enables the developers to switch between multiple child windows, browser tabs, and frames used in the application. For example, when you click on an internet banking link on a bank web application, it will open the internet banking application in a separate window or Tab. 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.

The WebDriver.TargetLocator interface is used to locate a given frame or window. In this section, we will see how WebDriver handles switching between browser windows and between two frames in the same window.                                                    

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.152.251