-3

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 at 5:22
1

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:

e.g.

Alert alert = driver.switchTo().alert();
// get the text of the alert
alert.getText();
// click OK / accept the alert
alert.accept();
0

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 {
 System.out.println(d.switchTo().alert().getText());
 d.switchTo().alert().accept();
}
catch(Exception e) {
 System.out.println("Alert not found");
}

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