Search code examples
selenium-webdriverselenium-chromedriverselenium-gridselenium-grid2

Facing issue in running chrome browser on Selenium Grid


I am able to run my test cases on firefox browser on Selenium Grid, but I am having issues while running the tests on Chrome Browser, its kind of configuration issue it seems.

I am getting below error while running the tests:-

org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.20.353124  (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.13.0-63-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 504 milliseconds
Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12'

I am running my node with following command:-

export PATH=$PATH:/root/ChromeDriver
java -jar selenium-server-standalone-2.48.2.jar -port $1 -role node -hub http://localhost:4444/grid/register -timeout 1800000 -nodeConfig nodeconfig.json -Dwebdriver.chrome.driver="/root/ChromeDriver/chromedriver"

below is my nodeconfig.json

{
  "capabilities":
  [
    {
      "browserName": "firefox",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    },
    {
      "browserName": "chrome",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    }
  ],
  "configuration":
     {
       "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
       "maxSession": 5,
       "register": true,
       "registerCycle": 5000,
       "hubPort": 4444,
      "hubHost": 127.0.0.1
    }
}

I've added the binary path also using command:-

-Dwebdriver.chrome.driver="/root/ChromeDriver/chromedriver"

Can somebody suggest what am I doing wrong?


Solution

  • The error is not saying that it cannot find the "chromedriver" binary.

    The error is telling you that Selenium could not find the location where Chrome browser itself was installed. Please check the PATH of chrome browser.