ChromeDriver 国内下载地址
https://chromedriver.com/download
靠谱

千千万万别下载错了
- 先确认 Chrome 浏览器版本

以 win64 版本为例
那我们下载这一个啊,不要下载错了

下载地址贴在这哈
https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.111/win64/chromedriver-win64.zip
直接把 URL 链接 复制到浏览器地址栏下载到本地即可

这就是下载好的
然后解压这个压缩包
下面复制 chromedriver.exe
文件,粘贴到 Chrome 浏览器目录下
说明下:
博主使用的 Chrome 浏览器目录是这个 C:\Program Files\Google\Chrome\Application

然后去配置 Windows 操作系统环境变量
博主现在这个本子还是 win10 哈,win11 大同小异,win7 很少了吧
下面一起看下
-
键盘同时按下 "windows 徽标键 + R " 快捷键
-
打开 运行 对话框
-
输入:
sysdm.cpl
直接
确定
或者回车
-
打开【系统属性】窗体后
-
依次点击选项卡【高级】、【环境变量】按钮
如下图: 系统属性 - 高级 - 环境变量


找到 系统变量
中的 Path,双击点开

把 chrome 浏览器所在目录的路径粘贴一下
然后点击 确定

这里也点确定

继续点击 确定
到这里环境变量是配置完毕了,那下面去验证一下

打开运行窗口
输入 cmd
同时按 Ctrl 键 + 回车键

下面输入 chromedriver

出现这样就表示安装成功了
C:\Windows\system32>chromedriver
Starting ChromeDriver 122.0.6261.111 (9d4c1072da62b411b351a38b9ed6214ab236aa7b-refs/branch-heads/6261@{#1015}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
好,那我们下一期再见咯,拜拜!