117selenium----selenium.common.exceptions.SessionNotCreatedException Message session not created报错

发布时间 2023-03-25 01:03:27作者: 她说没有光

我用的是谷歌,运行报错,selenium.common.exceptions.SessionNotCreatedException Message session not created

原因是:谷歌版本更新了

解决方法如下:

1、下载对应版本地址:https://registry.npmmirror.com/binary.html?path=chromedriver/

2、将新的chromedriver替换旧的chromedriver

查找旧版本chromedriver在哪

where chromedriver

3、二选一
(1)如果电脑python版本只有一个 可直接配置下环境变量即可

(2)如多个python版本,需如图,引入chromedriver安装的地址: