Selenium Fails with Chrome Version 32.0.1700.72 m

2019-02-16 23:46发布

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.

I'm running:

  • 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

And this is the exception I get:

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

So the ChromeDriver constructor call is failing.

Anyone else seeing same issue? Thanks!

4条回答
等我变得足够好
2楼-- · 2019-02-16 23:49

Just came across the same issue; And resolved by updating ChromeDriver from 2.4 to 2.8

查看更多
时光不老,我们不散
3楼-- · 2019-02-16 23:49

For our project, we use npm. I resolved the same issue by removing the node_modules\chromedriver, then running:

npm install chromedriver
查看更多
对你真心纯属浪费
4楼-- · 2019-02-16 23:56

This is common when Chrome/Firefox updates, ChromeDriver/Selenium always need to catch up.

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.

Otherwise if you need to keep ChromeDriver 2.2, you can also downgrade your Chrome to your old version.

查看更多
对你真心纯属浪费
5楼-- · 2019-02-17 00:11

Chrome updates happen often and not all updates will necessarily work with a particular version of chromedriver. Take control by installing the Google gpeditor admin templates and turn on the Google Chrome update policy. This way you can control and test your updates as required for both chrome and chromedriver. Note it is best to update chrome as soon as possible.

WikiHow shows you!

This is the approach I have taken since chrome 27 and chromedriver 2.1. Works well and keeps the integrity of your tests.

查看更多
登录 后发表回答