// 使用driver.switchTo().alert()方法获取alert对象
Alert alert = driver.switchTo().alert();
// 使用alert对象的accept方法,单击alert框上的确定按钮,关闭alert框
alert.accept();

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-01
  • 2021-10-05
  • 2021-07-01
  • 2022-12-23
  • 2021-11-22
  • 2021-08-27
相关资源
相似解决方案