SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version


運行testcase時報如下錯誤:

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 86

出現該問題的原因是:selenium模擬的客戶端對瀏覽器的操作,但相應瀏覽器的驅動版本不匹配導致的。

解決辦法:

1.找到我們當前使用瀏覽器的版本:chrome://version/

2.下載對應的瀏覽器驅動:http://npm.taobao.org/mirrors/chromedriver ,只需要根據操作系統,選擇不同的zip下載即可

3.zip解壓后將 chromedriver.exe 放在谷歌安裝目錄下;將chromedriver.exe 放在python安裝的目錄下script下

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM