Managing Windows

Web applications usually perform on a single window page. However, during execution, some new windows might be necessary to complete the process. The WebDriver class, combined with the WebDriver.TargetLocator interface, allows automation scripts to manage windows through the following methods:

  • java.lang.String getWindowHandle(): Returns a handle to the current window that identifies it within the driver instance being used. It is u Useful for switching to switch to that window in later steps.
  • java.util.Set<java.lang.String> getWindowHandles(): Returns a set of handles to the windows. It is useful for switching between windows.

See the Managing Alerts section for to see a detailed description of the switchTo() method and WebDriver.TargetLocator interface.
..................Content has been hidden....................

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