0

Modal dialog popup will raise when i click on button , the popup contain only Ok button. I should close the popup by click on ok button .

Exception coming : Exception in thread "main" org.openqa.selenium.UnhandledAlertException: Modal dialog present: First Name should not be blank

4

1 回答 1

0

尝试这个:

Alert alert = webDriver.switchTo().alert();
alert.accept();
于 2013-10-22T14:10:04.403 回答