How to handle Pop-up in Selenium WebDriver using Java
To switch to a popup window, you need to use getWindowHandles() and iterate through them. In your code you are using getWindowHandle() which will give you the parent window itself. String parentWindowHandler = driver.getWindowHandle(); // Store your parent window String subWindowHandler = null; Set<String> handles = driver.getWindowHandles(); // get all window handles Iterator<String> iterator = … Read more