【Selenium专题】FAQ_浏览器_ChromeDriver版本导致报错
报错信息
Started ChromeDriver port=31984 version=23.0.1240.0 log=C:\workspace\test\chromedriver.log [0630/171638:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends [0630/171638:ERROR:automation_proxy.cc(319)] Channel error in AutomationProxy. [0630/171638:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends [0630/171638:ERROR:ipc_sync_channel.cc(378)] Canceling pending sends Exception in thread "main" org.openqa.selenium.WebDriverException: Chrome did not respond to 'GetChromeDriverAutomationVersion'. Elapsed time was 5 ms. (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 13.70 seconds Build info: version: '2.23.1', revision: '17143', time: '2012-06-08 18:59:28' System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_60' Driver info: driver.version: ChromeDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:188) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:458) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:139) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:94) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:165) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107) at test.webtest.main(webtest.java:16)
解决方案
chromedriver.exe当前版本为:version: '2.23.1', revision: '17143', time: '2012-06-08 18:59:28',该版本可能不支持当前最新chrome浏览器,或存在未修复的bug。
更换为最新版chromedriver.exe(2014/2/6版),重新运行该问题已经解决了。
总结:开源工具一定要注意版本问题。。。。