我正在尝试使用python3上的selenium点击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()
答案 0 :(得分:0)
您可以使用selenium的选择类及其API,例如select_by_index或select_by_value: 参考:[http://selenium-python.readthedocs.io/api.html]