F12 is not working on webpage dialog, tried to change the settings of IE with no luck.

Dont want to use AutoIT.

  • 1
    What is a Web page dialog? – dzieciou Jul 4 '19 at 5:22

A picture would make it much easier to work out what exactly you are asking, however I'll assume it's alert messages (i.e. JavaScript popups).

Selenium can work with those by using the Alert interface:


Alert alert = driver.switchTo().alert();
// get the text of the alert
// click OK / accept the alert
| improve this answer | |

Hope the dialog are alerts in browser. Try the below code. If alert will be there then that will be accepted and its message will be print in output otherwise catch block will accept that exception and "Alert not found" will print.

try {
catch(Exception e) {
 System.out.println("Alert not found");
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.