Windows下配置Chrome WebDriver

其实就是下载一个exe,放在chrome下面,添加到环境变量

Windows下配置Chrome WebDriver

下载地址,选版本:

http://npm.taobao.org/mirrors/chromedriver/

http://chromedriver.storage.googleapis.com/index.html

选择版本,我一般选和浏览器版本一致的:

 

这个也可以选版本:http://chromedriver.storage.googleapis.com/index.html 下载

将WebDriver复制到Chrome的安装目录

安装目录可以通过在Chrome地址栏中输入chrome://version/来查看

一般默认的安装目录是

C:\Program Files (x86)\Google\Chrome

即将chromedriver.exe文件复制到C:\Program Files (x86)\Google\Chrome\Application下

将WebDriver的路径复制到系统环境变量PATH中

即将C:\Program Files (x86)\Google\Chrome\Application添加到PATH中

解决:'chromedriver' executable needs to be in PATH的问题

将chromedriver.exe拷贝到python的的根目录
参考我的python目录:D:\Program Files\Python\Python37-32  

posted @ 2022-07-29 07:09  Maybach  阅读(1395)  评论(0编辑  收藏  举报