0

When I execute a test suite, tearDown() method fails randomly and all tests below it gets skipped. Below are the details. SCREENSHOT ATTACHED.

TESTNG trace:

org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died. Build info: version: '2.46.0', revision: '61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50' System info: host: 'W7-VDI-WDW704', ip: '10.207.15.35', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_152' Driver info: driver.version: RemoteWebDriver

LOG:

INFO: Command failed to close cleanly. Destroying forcefully (v2). org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@12c7a01b 
Oct 09, 2018 4:03:01 PM org.openqa.selenium.os.ProcessUtils killWinProcess WARNING: Process refused to die after 10 seconds, and couldn't taskkill it
org.openqa.selenium.os.ProcessUtils$ProcessStillAliveException: Timeout waiting for process to die at org.openqa.selenium.os.ProcessUtils.waitForProcessDeath(ProcessUtils.java:67) at (...)

Suite Total tests run: 196, Failures: 4, Skips: 175 Configuration Failures: 176, Skips: 175

enter image description here

  • Chrome version: Version 69.0.3497.100
  • Chromedriver: ChromeDriver 2.42**
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Afsal
  • 404
  • 3
  • 7
  • 24

1 Answers1

0

This error message...

org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died
.
INFO: Command failed to close cleanly. Destroying forcefully (v2). org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@12c7a01b Oct 09, 2018 4:03:01 PM org.openqa.selenium.os.ProcessUtils killWinProcess WARNING: Process refused to die after 10 seconds, and couldn't taskkill it

...implies that the ChromeDriver was unable to kill the WebBrowser i.e. RemoteWebDriver.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

As per the discussion On Windows, RemoteWebDriver.quit() is always destroying forcefully? this issue was evident in pre Selenium v2.45.0 builds where @timja2 mentioned in his comment that:

it expected to always destroy harder on Windows

This fix was incorporated through commit 7a5e890 and was expected to be available from Selenium v2.53.1 onwards.

Solution

  • Upgrade Selenium to minimum Version 2.53.1 or current level of Version 3.14.0.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352