【发布时间】:2014-07-23 13:23:16
【问题描述】:
我正在一个应用程序上运行链接测试,其中一个链接会弹出一个登录弹出窗口。有没有办法检查?我尝试将其视为警报,但没有奏效。
try
{
WebDriverWait wait = new WebDriverWait(driver, 2);
wait.until(ExpectedConditions.alertIsPresent());
Alert alert = driver.switchTo().alert();
alert.accept();
reportAlertPresent = true;
}
【问题讨论】:
标签: java selenium-webdriver popupwindow