I am working on automation of a website using Selenium WebDriver and Java, but I am stuck in a situation where on a button click a new webpage dialog opens and on that web page dialog I have perform Operations like entering values / selecting from Dropdowns.
Problem is I am unable to switch to that webpage dialog and even F12 window not working on that webpage dialog. This website is only working on IE. Please help me.
driver.findElement(By.id("buttonOK")).click(); //operation on main browser
Thread.sleep(3000);
driver.switchTo().activeElement(); // This didn't switch to webpage dialog
for(String winHandle : driver.getWindowHandles()){ // this code also didn't switchTo webpage dialog
driver.switchTo().window(winHandle);
}
driver.findElement(By.name("textDataValue")).sendKeys("test"); //operation on webpage dialog
Screenshot: enter image description here