进入
UnhandledalertException后尝试一下
catch
WebDriverWait wait = new WebDriverWait(driver, 3000);wait.until(ExpectedConditions.alertIsPresent());alert alert = webDriver.switchTo().alert();alert.accept();
可能会帮助您… :)

进入
UnhandledalertException后尝试一下
catch
WebDriverWait wait = new WebDriverWait(driver, 3000);wait.until(ExpectedConditions.alertIsPresent());alert alert = webDriver.switchTo().alert();alert.accept();
可能会帮助您… :)