Error:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 95
Current browser version is 97.0.4692.71 with binary path /usr/bin/chromium-browser
检查chrome和chromewebdriver版本均为97.0.4692.71。故并非chrome和chromewebdriver引起的错误。
偶然发现代码在python2.7中可以运行,pip list发现使用的是selenium (3.8.0),但在pip3中是selenium (4.0.0a1)所以在用python3 运行代码是会报错。实际上在selenium 4.0.0a1中还是使用的chrome 95版本的驱动引起的错误。
网友评论