# 弹窗处理
web_alert=driver.switch_to.alert
# ①确认,alert弹窗,只有确认弹窗
web_alert.accept()
# ②取消,confirm弹窗,有确认取消
web_alert.dismiss()
# ③输入文本,prompt弹窗,有文本输入
web_alert.send_keys('124123')
# 获取prompt弹窗内容
web_alert.text

 

相关文章:

  • 2021-12-19
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2021-06-22
猜你喜欢
  • 2021-11-15
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2021-12-23
  • 2021-08-12
  • 2022-12-23
相关资源
相似解决方案