[英]python3 How do I click dropdown box using selenium
我正在嘗試在python3上使用硒單擊Dropbox。 但我收到一個錯誤消息。
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: Unable to find element on closed window
我的代碼如下。
driver.find_element_by_css_selector("#RegularCategory>div.pagination dl.dropdown dt a span").click()
您可以使用硒的select類及其API,例如select_by_index或select_by_value:參考: [http://selenium-python.readthedocs.io/api.html]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.