SessionNotCreatedException:消息:未创建会话:此版本的ChromeDriver仅支持使用Selenium ChromeDriver v81的Chrome版本81 [英] SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81 using Selenium ChromeDriver v81
问题描述
我从Selenium和os导入了webdriver.我希望能够成功运行这段代码:
I imported webdriver from selenium and os. I want to be able to run this piece of code successfully:
driver = webdriver.Chrome(executable_path= os.path.abspath('') + '/chromedriver')
我得到的错误:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81
我在MAC OSX上使用python 2.7.我从 https://sites.google安装了chromedriver版本81.0.4044.138.com/a/chromium.org/chromedriver/downloads 在同一个工作空间目录中,并且名为"chromedriver",但这就像我的webdriver无法识别它.任何建议,我将不胜感激!
I'm using python 2.7 on a MAC OSX. I have version 81.0.4044.138 of the chromedriver installed from https://sites.google.com/a/chromium.org/chromedriver/downloads in the same workspace directory, and it is named 'chromedriver', but it's like my webdriver doesn't recognize it. I would appreciate any suggestions!
推荐答案
此错误消息...
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81
...表示 ChromeDriver 无法启动/产生新的浏览上下文,即 Chrome浏览器会话.
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
您的主要问题是所使用的二进制文件版本之间的不兼容性:
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- 您正在使用 ChromeDriver 81.0
- ChromeDriver 81.0 明确提及以下内容:
支持 Chrome 81版
大多数可能是 Chrome浏览器已更新为 Chrome v83.0 作为最新推送的一部分.
Most probhably the Chrome Browser got updated to Chrome v83.0 as a part of the recent push.
- ChromeDriver v83.0 明确提到以下内容:
支持 Chrome 83版
- 您的 Selenium Client 版本对我们未知.
- Your Selenium Client version is unknown to us.
- 硒已升级到当前级别版本3.141.59 .
- ChromeDriver 已更新为当前的 ChromeDriver v83.0 级.
- Chrome 已更新为当前的 Chrome版本83.0 级别.(根据 ChromeDriver v83.0发行说明)
- 如果您的基本 Web客户端版本太旧,则将其卸载并安装最新版本的 Web客户端 GA.
- 以非root用户用户的身份执行
@Test
. - Selenium is upgraded to current levels Version 3.141.59.
- ChromeDriver is updated to current ChromeDriver v83.0 level.
- Chrome is updated to current Chrome Version 83.0 level. (as per ChromeDriver v83.0 release notes)
- If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
- Execute your
@Test
as non-root user.
因此 ChromeDriver v81.0 与 Chrome浏览器v83.0
确保:
这篇关于SessionNotCreatedException:消息:未创建会话:此版本的ChromeDriver仅支持使用Selenium ChromeDriver v81的Chrome版本81的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!