一鍵解決selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versio
問(wèn)題描述
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versio
下滑查看解決方法
解決思路
這個(gè)錯(cuò)誤提示表明你的ChromeDriver版本不支持你的Chrome瀏覽器版本。為了解決這個(gè)問(wèn)題,你需要下載與你的Chrome瀏覽器版本相對(duì)應(yīng)的ChromeDriver版本。
下滑查看解決方法
解決方法
以下是詳細(xì)的解決方法:
首先,你需要確定你的Chrome瀏覽器的版本號(hào)。在Chrome瀏覽器的地址欄中輸入 chrome://version,然后查看瀏覽器版本號(hào)。
接下來(lái),你需要下載與你的Chrome瀏覽器版本相對(duì)應(yīng)的ChromeDriver版本。你可以從以下兩個(gè)地址中的任意一個(gè)下載ChromeDriver:
https://registry.npmmirror.com/binary.html?path=chromedriver/
http://chromedriver.storage.googleapis.com/index.html
下載完ChromeDriver后,你需要將它放在一個(gè)你可以輕松訪問(wèn)的位置。你可以使用命令 where chromedriver 來(lái)查看你電腦上的ChromeDriver位置。文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-762230.html
最后,你需要在你的Python代碼中指定ChromeDriver的路徑。你可以使用以下代碼來(lái)指定ChromeDriver的路徑:文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-762230.html
from selenium import webdriver
driver = webdriver.Chrome('/path/to/chromedriver')
到了這里,關(guān)于一鍵解決selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versio的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!