錯誤提示:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 96
Current browser version is 102.0.5005.63
原因:
Chrome版本和ChromeDriver版本不一致,極有可能是Chrome瀏覽器自動升級了新版本,導(dǎo)致兩者版本差異,運(yùn)行不了。
解決方法:
1)查看Chrome瀏覽器的版本
我這里是102版本的;
2)下載對應(yīng)版本的ChromeDriver
下載地址:ChromeDriver
我下載的是上面的102版本最后一個,因?yàn)槲业腃hrome就是102的。
3)查找chromedrciver.exe的位置
在命令行窗口輸入:文章來源:http://www.zghlxwxcb.cn/news/detail-738996.html
where chromedriver
就可以看到安裝的它的位置。
4)替換
直接將剛下載的chromedriver.exe放到上面的位置,進(jìn)行替換,就大功告成了。文章來源地址http://www.zghlxwxcb.cn/news/detail-738996.html
到了這里,關(guān)于selenium啟動報錯:selenium.common.exceptions.SessionNotCreatedException: Message: session not created的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!