请问,是selenium 与webdriver版本不一致引起的错误,还是?

from selenium import webdriver
chromedriver = 'D:\Program Files (x86)\ChromeCore\chromedriver.exe'#chromedriver是2.38 win32版本,ChromeCore是65版本
url = 'http://www.baidu.com/'
browser = webdriver.Chrome(executable_path=chromedriver)
browser.get(geturl)

反馈结果是:Traceback (most recent call last):
File "", line 4, in
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in init
desired_capabilities=desired_capabilities)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\PycharmProjects\untitled\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 6.1.7601 SP1 x86_64)

2个回答

最后下载了一个老版的chrome浏览器及一个相配套的chromedriver 安装到c盘同一个目录中,就搞定了

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问