簡體   English   中英

在Python中使用switch_to()進行安全警告對話框

[英]Using switch_to() in Python for a Security Warning Dialogue Box

我在Firefox中收到“安全警告”彈出框。

我正在使用Python和Selenium

driver.switch_to().alert().accept()

TypeError: 'SwitchTo' object is not callable

有什么建議么?

這是正確的語法:

driver.switch_to.alert.accept()

要么:

driver.switch_to_alert().accept()

要么:

Alert(driver).accept()

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM