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 浏览器 版本不是 73.0
It is pretty evident your Chrome Browser version is not of version 73.0
@Test
.tearDown(){}
方法中调用 driver.quit()
来关闭 &优雅地销毁 WebDriver 和 Web Client 实例.@Test
.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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!