運行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下