How can selenium web driver get to know when the new window has opened and then resume its execution
You need to switch the control to pop-up window before doing any operations in it. By using this you can solve your problem. Before opening the popup window get the handle of main window and save it. String mwh=driver.getWindowHandle(); Now try to open the popup window by performing some action: driver.findElement(By.xpath(“”)).click(); Set s=driver.getWindowHandles(); //this method … Read more