Window Handling

In Selenium each new window gets a unique id in alphanumeric.So that whenever we are required to switch between webpage windows it will be so easy. Using the switch method in the webdriver class it is possible.

Example : Whenever we launch a webpage it treats it as a new window and when we click on a button in the webpage which launches a new popup window web page it also contains a unique id in alphanumeric.

Below are the some selenium window methods and properties which we use.

  • Current_window_handle property
  • window_handles property
  • windows() method

Let's discuss one by one in the next chapter.