错误:System.InvalidOperationException:未创建会话:使用ChromeDriver的Chrome版本必须在70到73之间,通过Selenium的Chrome版本 [英] Error: System.InvalidOperationException: session not created: Chrome version must be between 70 and 73 using ChromeDriver and Chrome through Selenium
问题描述
Result StackTrace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
at WhitelabelUITest_New.Initializers.Initialize() in X:\QA\WhitelabelUI-Automation\WhitelabelUITest-New\Initializers.cs:line 87
at WhitelabelUITest_New.Initializers..ctor() in X:\QA\WhitelabelUI-Automation\WhitelabelUITest-New\Initializers.cs:line 41
at WhitelabelUITest_New.Webpage..ctor()
at WhitelabelUITest_New.ImpressionTests..ctor()
Result Message: Unable to create instance of class WhitelabelUITest_New.ImpressionTests. Error: System.InvalidOperationException: session not created: Chrome version must be between 70 and 73
(Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.16299 x86_64) (SessionNotCreated).
我安装了最新版本的Chrome驱动程序,但是每次运行测试用例时,它不会
I installed the latest version of Chrome driver, but every time I run a test case, it does not initiate the Chrome driver and the test fails.
推荐答案
此错误消息...
Result Message: Unable to create instance of class WhitelabelUITest_New.ImpressionTests. Error: System.InvalidOperationException: session not created: Chrome version must be between 70 and 73
(Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.16299 x86_64) (SessionNotCreated).
...表示 ChromeDriver 期望 Chrome浏览器版本在70和73之间。
...implies that the ChromeDriver expects the Chrome Browser version to be between 70 and 73.
您的主要问题是版本之间的不兼容所使用的二进制文件如下:
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- 您正在使用 chromedriver = 73.0.3683.68
chromedriver = 73.0.3683.68 明确提到以下内容:
支持 Chrome v73
- 我们不知道您的 Chrome浏览器版本。 / li>
- Your Chrome Browser version is unknown to us.
- 保持 ChromeDriver 转到 ChromeDriver v73.0.3683.68
- 将 Chrome 版本升级/降级到 Chrome v73 级别。 (根据ChromeDriver v73.0.3683.68发行说明)
- 清洁通过您的 IDE 清洁您的项目工作区,并重建您的项目
- 如果您的基本 Web Client 版本太旧,则将其卸载并安装最新版本的 Web Client 。
- 执行您的
@Test
。 - 始终调用
tearDown(){}
方法中使用> driver.quit()关闭&优雅地销毁 WebDriver 和 Web Client 实例。 - Keep ChromeDriver to ChromeDriver v73.0.3683.68 level.
- Upgrade/Downgrade Chrome version to Chrome v73 level. (as per ChromeDriver v73.0.3683.68 release notes)
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
- 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
. - Always invoke
driver.quit()
withintearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully. - How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium
很明显,您的 Chrome浏览器版本不是版本 73.0
It is pretty evident your Chrome Browser version is not of version 73.0
您可以在以下位置找到相关的详细讨论:
You can find a relevant detailed discussion in:
这篇关于错误:System.InvalidOperationException:未创建会话:使用ChromeDriver的Chrome版本必须在70到73之间,通过Selenium的Chrome版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!