问题描述
浏览器会自动更新到今天上午(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米
- 硒ChromeDriver V2.2
- .NET C#
- Windows 7 Enterprise (SP1) 64-bit
- Chrome Version 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:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs: line 1012
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs: line 846
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs: line 814
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Remote\RemoteWebDriver.cs: line 89
at OpenQA.Selenium.Chrome.ChromeDriver..ctor(String chromeDriverDirectory, ChromeOptions options) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Chrome\ChromeDriver.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 /硒总是需要迎头赶上。
This is common when Chrome/Firefox updates, ChromeDriver/Selenium always need to catch up.
不过,最新的ChromeDriver应该支持Chrome 32已经。你的情况是因为你使用的方式过时ChromeDriver 2.2。请使用最新版本2.8,你可以下载它href=\"http://chromedriver.storage.googleapis.com/index.html?path=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.
这篇关于硒与Chrome版本32.0.1700.72米失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!