How to handle dynamically changing popup in Webdriver?

Dynamic means the Name is not constant. It changes frequently

Use the below approach to handle Dynamically changing popup

Set s=driver.getWindowHandles();
Object popup[]=s.toArray();
driver.switchTo().window(popup[1].toString());

No comments:

Post a Comment