Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
338 views
in Technique[技术] by (71.8m points)

java - Automation Testing Error : org.openqa.selenium.WebDriverException: disconnected: unable to connect to renderer

I am new in automation testing and I am facing the following error. I am not able to proceed further. Can someone help me out in this : {Error}

Starting ChromeDriver 2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8) on port 47649
Only local connections are allowed.
Feb 06, 2018 4:48:10 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Exception in thread "main" org.openqa.selenium.WebDriverException: disconnected: unable to connect to renderer
  (Session info: chrome=64.0.3282.140)
  (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.03 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'ALPSCMO-QA10', ip: '10.50.7.126', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_112'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=C:UsersmanandAppDataLocalTempscoped_dir6152_17631}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=64.0.3282.140, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]
Session ID: 3afbe7096bc143edfa25f5ae8616b830
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:925)
    at AutomationFramework.FirstTestClass.main(FirstTestClass.java:19)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The error says it all :

Exception in thread "main" org.openqa.selenium.WebDriverException: disconnected: unable to connect to renderer
  (Session info: chrome=64.0.3282.140)
  (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 6.1.7601 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.03 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'ALPSCMO-QA10', ip: '10.50.7.126', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_112'
Driver info: org.openqa.selenium.chrome.ChromeDriver

Your main issue is the version compatibility among the binaries you are using as follows :

  • You are using chromedriver=2.31
  • Release Notes of chromedriver=2.31 clearly mentions the following :

Supports Chrome v58-60

  • You are using chrome=64.0
  • Release Notes of ChromeDriver v2.35 clearly mentions the following :

Supports Chrome v62-64

  • Your Selenium Client is not getting detected, so we are unable to know the Selenium Client version.
  • Your JDK version is 1.8.0_112 which is pretty ancient.

So there is a clear mismatch between the JDK version , Selenium Client version , ChromeDriver version (v2.31) and the Chrome Browser version (v64.0)

Solution

  • Upgrade JDK to recent levels JDK Version 8 Update 151.
  • Upgrade Selenium to current levels Version 3.8.1.
  • Upgrade ChromeDriver to ChromeDriver v2.35 level.
  • Keep Chrome to Chrome v64.x levels. (as per ChromeDriver v2.35 release notes)
  • If your base Chrome version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Chrome.
  • Execute your Test.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...