[Solved] When I run test in selenium using java, the alert gets closed but in code it shows failure
According to you, you are able to accept the alert but test step is showing exception in console : You can catch the exception and proceed further with your next steps: Below is the code : try { Alert myAlert = driver.switchTo().alert(); myAlert.accept(); } catch (Exception e) { System.out.println(“######### Successfully Accepted Alert ################”); } // … Read more