chromedriver下载地址:https://chromedriver.storage.googleapis.com/index.html
Chrome旧版下载地址:http://mydown.yesky.com/pcsoft/416318/versions/
选择谷歌快捷方式的打开文件所在位置
谷歌版本是73.0.3683.86
chromedriver的2.46版本支持73
将下载的文件解压
放置到Python的scripts目录下
测试语句(打开谷歌浏览器):
from selenium import webdriver
browser=webdriver.Chrome()
报错error:selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH
是需要在browser=webdriver.Chrome()中加入绝对路径
browser = webdriver.Chrome(executable_path = “D:\Python37\Scripts\chromedriver.exe”)