WindowsHandler


We can handle multiple windows using Windows Handlers in selenium webdriver.
Step 1: After opening the website, we need to get the main window handle by using driver.getWindowHandle();
The window handle will be in a form of lengthy alpha numeric
Step 2: We now need to get all the window handles by using driver.getWindowHandles();
Step 3: We will compare all the window handles with the main Window handles and perform the operation the window which we need.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.