方法一:
step1:下载谷歌驱动程序:下载地址
step2:把“chromedriver.exe”复制到 谷歌浏览器(C:\Program Files\Google\Chrome\Application)和python(C:\Python27)的安装目录
step3:将谷歌浏览器目录(C:\Users\HD003\AppData\Local\Google\Chrome\Application)添加到path环境变量
方法二:
如果方法一不行,直接使用 executable_path="C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe" 赋值
1 from selenium import webdriver 2 3 driver = webdriver.Chrome(executable_path="C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe") 4 driver.get("http://HdhCmsTestbaidu测试数据/")
查看更多关于【python】+'chromedriver' executable needs t的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did170338