Selenium Java - Handling Windows, Frames, and Alerts
Consider this code snippet:
What will happen when this code runs?
Alert alert = driver.switchTo().alert();
alert.accept();
System.out.println(alert.getText());
What will happen when this code runs?
