错误:System.InvalidOperationException:未创建会话:Chrome 版本必须在 70 到 73 之间,使用 ChromeDriver 和 Chrome 通过 Selenium [英] Error: System.InvalidOperationException: session not created: Chrome version must be between 70 and 73 using ChromeDriver and Chrome through Selenium

查看:33
本文介绍了错误:System.InvalidOperationException:未创建会话:Chrome 版本必须在 70 到 73 之间,使用 ChromeDriver 和 Chrome 通过 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:QAWhitelabelUI-AutomationWhitelabelUITest-NewInitializers.cs:line 87
   at WhitelabelUITest_New.Initializers..ctor() in X:QAWhitelabelUI-AutomationWhitelabelUITest-NewInitializers.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驱动,但是每次运行一个测试用例,都没有启动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:

支持 Chrome v73

  • 我们不知道您的 Chrome 浏览器版本.
  • 很明显,您的 Chrome 浏览器 版本不是 73.0

    It is pretty evident your Chrome Browser version is not of version 73.0

    • ChromeDriver 保存到 ChromeDriver v73.0.3683.68 级别.
    • 升级/降级 Chrome 版本到 Chrome v73 级别.(根据 ChromeDriver v73.0.3683.68 发行说明)李>
    • 清理你的项目工作区通过你的IDE重建你的项目只需要依赖.
    • 如果您的基本 Web 客户端 版本太旧,请卸载它并安装最新的 GA 和发布版本的 Web 客户端.
    • 执行你的 @Test.
    • 总是在 tearDown(){} 方法中调用 driver.quit() 来关闭 &优雅地销毁 WebDriverWeb 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() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

    您可以在以下位置找到相关的详细讨论:

    You can find a relevant detailed discussion in:

    这篇关于错误:System.InvalidOperationException:未创建会话:Chrome 版本必须在 70 到 73 之间,使用 ChromeDriver 和 Chrome 通过 Selenium的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆