Selenium Fails with Chrome Version 32.0.1700.72 m(Selenium 使用 Chrome 版本 32.0.1700.72 m 失败)
问题描述
Chrome 今天早上(2014 年 1 月 8 日)为我自动更新到版本 32.0.1700.72 m",现在我所有的自动化测试都将无法运行——它们因System.InvalidOperationException:System.InvalidOperationException:未知错误而失败": 无法立即发现打开的页面".
Chrome automatically updated to "Version 32.0.1700.72 m" for me this morning (1/8/2014) and now all my automated tests will not run--they fail with "System.InvalidOperationException: System.InvalidOperationException: unknown error: unable to discover open pages" almost immediately.
我在跑步:
- Windows 7 企业版 (SP1) 64 位
- Chrome 版本 32.0.1700.72 m
- Selenium ChromeDriver v2.2
- .NET C#
这是我得到的控制台输出:
This is the console output that I get:
Starting ChromeDriver (v2.2) on port 26819
[8668:8300:0108/162344:ERROR:chrome_views_delegate.cc(176)] NOT IMPLEMENTED
[8668:8300:0108/162344:ERROR:desktop_root_window_host_win.cc(746)] NOT IMPLEMENTED
[8668:8300:0108/162345:ERROR:desktop_root_window_host_win.cc(746)] NOT IMPLEMENTED
这是我得到的例外:
Class Initialization method LeadManager.Web.UITest.Tests.ViewLeads.PriorityModeTests.ClassInitialize threw exception. System.InvalidOperationException: System.InvalidOperationException: unknown error: unable to discover open pages
(Driver info: chromedriver=2.2,platform=Windows NT 6.1 SP1 x86_64).
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) in c:ProjectsWebDriver runkdotnetsrcWebDriverRemoteRemoteWebDriver.cs: line 1012
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:ProjectsWebDriver runkdotnetsrcWebDriverRemoteRemoteWebDriver.cs: line 846
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) in c:ProjectsWebDriver runkdotnetsrcWebDriverRemoteRemoteWebDriver.cs: line 814
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) in c:ProjectsWebDriver runkdotnetsrcWebDriverRemoteRemoteWebDriver.cs: line 89
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(String chromeDriverDirectory, ChromeOptions options) in c:ProjectsWebDriver runkdotnetsrcWebDriverChromeChromeDriver.cs: line 101
at UITestFramework.Providers.WebDriverProvider.CreateWebDriver(TestSettings settings) in WebDriverProvider.cs: line 73
at UITestFramework.Domain.TestSettings..ctor(BrowserType browserType, String baseUrl) in TestSettings.cs: line 69
at LeadManager.Web.UITest.Tests.SettingsFactory.GetSettings() in SettingsFactory.cs: line 33
at LeadManager.Web.UITest.Tests.ViewLeads.PriorityModeTests.ClassInitialize(TestContext context) in PriorityModeTests.cs: line 38
所以 ChromeDriver 构造函数调用失败.
So the ChromeDriver constructor call is failing.
还有其他人看到同样的问题吗?谢谢!
Anyone else seeing same issue? Thanks!
推荐答案
Chrome/Firefox 更新时这种情况很常见,ChromeDriver/Selenium 总是需要跟上.
This is common when Chrome/Firefox updates, ChromeDriver/Selenium always need to catch up.
不过,最新的 ChromeDriver 应该已经支持 Chrome 32.您的情况是因为您使用的是过时的 ChromeDriver 2.2.请使用最新版本 2.8,您可以在这里下载.
However, the latest ChromeDriver should support Chrome 32 already. Your situation is because you are using way out of date ChromeDriver 2.2. Please use the latest version 2.8, you can download it here.
否则,如果您需要保留 ChromeDriver 2.2,您也可以将 Chrome 降级到旧版本.
Otherwise if you need to keep ChromeDriver 2.2, you can also downgrade your Chrome to your old version.
这篇关于Selenium 使用 Chrome 版本 32.0.1700.72 m 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Selenium 使用 Chrome 版本 32.0.1700.72 m 失败
基础教程推荐
- 从 C# 控制相机设备 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 将数据集转换为列表 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 如果条件可以为空 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
