使用python selenium丢失或未知entry.level错误

时间:2017-12-08 09:12:12

标签: python python-3.x selenium selenium-chromedriver

chromedriver = webdriver.Chrome('C:\Python3\chromedriver.exe')
#os.environ["webdriver.chrome.driver"] = chromedriver
chrome_options = Options()

# this is the preference we're passing
prefs = {"download.default_directory" : "F:/"}
chrome_options.add_experimental_option("prefs", prefs)
#driver = webdriver.Chrome(chrome_options=chrome_options)
chromedriver.get("{some website which has the element with ID xxxx_TxtSearch}")
num = chromedriver.find_element_by_xpath("//*[contains(@id, 'TxtSearch')]")

最后一行产生以下错误。附上截图供参考。我相信直到昨天才会出现任何问题,并且chromedriver出现在指定地点。

Stacktrace of the error

1 个答案:

答案 0 :(得分:0)

我和chromedriver 2.25有同样的问题

升级到2.35并解决问题。