[英]How to click on checkbox buttons in a Pop-up window with Selenium WebDriver- Python
我需要專注於彈出窗口並選中復選框。(附有截圖)
我試圖定義瀏覽器以接受將出現的每個彈出窗口。
def update_firefox_profile():
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
profile.assume_untrusted_cert_issuer = False
profile.update_preferences()
return profile
你還有其他主意嗎? 謝謝 !
請檢查這是網絡彈出窗口還是彈出窗口。 如果是Web彈出窗口,請嘗試檢查彈出窗口上的元素以選擇所需的復選框。 如果彈出窗口,則可以使用AutoIT腳本。 另一種方法是使用import java.awt.Robot。 使用機器人類,您可以發送鍵盤事件以選擇所需的復選框,然后單擊提交按鈕。 但是在這種情況下,您應該假定復選框的順序將相同。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.