Selenium Java - Handling Windows, Frames, and Alerts
Identify the error in this Selenium Java code snippet that tries to dismiss an alert:
Alert alert = driver.switchTo().alert(); alert.accept(); alert.dismiss();
