117selenium----selenium.common.exceptions.SessionNotCreatedException Message session not created报错
我这用的selenium版本是4.9.0
如果是更高的版本 不用加 :可参考:https://stackoverflow.com/questions/76550506/typeerror-webdriver-init-got-an-unexpected-keyword-argument-executable-p
我用的是谷歌,运行报错,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安装的地址:
本文来自博客园,作者:__username,转载请注明原文链接:https://www.cnblogs.com/code3/p/17253990.html
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步