Fetching the window handles

In order to switch between all available windows, Selenium first needs to get hold of the window handles. For this purpose, there are two methods provided: getWindowHandle() and getWindowHandles():

  • getWindowHandle(): This method, when invoked on the WebDriver object, returns the handle of the current window which has the focus
  • getWindowHandles(): This method, when invoked on the WebDriver object, returns a set of all open windows
..................Content has been hidden....................

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