selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Selenium Grid node does not honour chrome_binary setting

Open orenault opened this issue 9 years ago • 6 comments

Meta -

OS: Hub on Linux (suse 11.4) & nodes on windows (win2k8R2) Selenium Version: Selenium 3.2.0 - GRID Browser: Chrome 53 & 56 (but the version is not important for this issue)

Expected Behavior -

  • 2 different chrome are installed on a node: version 56 installed on the chrome default path version 53 installed on a specific path (example: d:\softs\chrome\chrome.exe)

We should be able to run a test on a specific Chrome version, just by adding the version in the desiredCapabilities of the test case, whatever this chrome version binary is installed on the node. The only condition should be that the node configuration settings have a "chrome_binary" value defined, like firefox with the "firefox_binary" value.

This was working with Selenium 2.x after a fix: (cf: https://github.com/SeleniumHQ/selenium/commit/41a9d29bc3bb6f4d8d4ad25b291fadb99619a1c8)

Seems this not works anymore with Selenium 3.x.

Actual Behavior -

  • 2 different chrome are installed on a node: version 56 installed on the chrome default path version 53 installed on a specific path (example: d:\softs\chrome\chrome.exe)

  • with Selenium Grid 2.x, we can specify the chrome binary path in the node configuration, so the HUB can find the chrome binary when a test is specifying the chrome version in the RequiredCapabilities. (cf: https://github.com/SeleniumHQ/selenium/commit/41a9d29bc3bb6f4d8d4ad25b291fadb99619a1c8)

  • with Selenium Grid 3.x, this don't work anymore. => if the test specify only the version 53 in the desiredCapabilities, the HUB display the test running on the 53 version, but this is the binary installed in the default path which is used (aka v56). FAILED => if the test specify the version 53 and the correct specific chrome path, then the binary of v53 in the specific chrome path is used. PASSED => if I remove the v56 of default path (so just v53 on specific path on the node), and the test only specify the v53 version, then the node fails with error "cannot find Chrome binary". FAILED.

So is it possible to find a way to have the HUB able to construct a correct chromeOptions with a "binary" value correct when the node configuration specify this for a specific browser version ? Or does this means that we can't, with Selenium 3.x, use different browser versions on the same node (so this is a limitation of the 3.x version versus the 2.x version which allow this) ?

Regards Olivier

orenault avatar Mar 09 '17 09:03 orenault

@orenault - Would you have a sample test code that you can share, so that this issue can be reproduced ? Also please help share any node configuration json file that you may be using for your Selenium nodes

krmahadevan avatar Mar 12 '17 14:03 krmahadevan

I'm finding that "chrome_binary" is being ignored. Here is my node config:

  "capabilities": [
    {
      "browserName": "chrome",
      "chrome_binary": "/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",
      "version": "canary",
      "maxInstances": 1,
      "seleniumProtocol": "WebDriver"
    }
  ],

However, whenever I start a new remote webdriver instance, the default Chrome binary path is being used. I had never tried this on 2.x to know if this is a regression for 3.x, but currently I am using 3.3.1 and I can't get "chrome_binary" to work.

cassareh avatar Mar 27 '17 20:03 cassareh

I am facing the same issue i.e. chrome_binary is being ignored. Any work around to that?

sajidchingchong avatar Apr 28 '17 04:04 sajidchingchong

I have the same error, too. I reported it for chromedriver, but they pointed out that this is an issue with Selenium itself. Here is the original issue: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1783

I tested with 3.4.0 where the default Chrome instance was used no matter what path I specified using chrome_binary, whereas it worked fine with 2.53.1.

szgabsz91 avatar May 17 '17 15:05 szgabsz91

It's effectively a duplicate of #3123

barancev avatar Sep 14 '17 05:09 barancev

I tried this and it worked fine with me:

{
  "capabilities":
  [
    {
      "browserName": "firefox",
      "marionette": true,
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    },
    {
      "browserName": "chrome",
      "maxInstances": 5,
      "seleniumProtocol": "WebDriver"
    },
    {
      "browserName": "internet explorer",
      "platform": "WINDOWS",
      "maxInstances": 1,
      "seleniumProtocol": "WebDriver"
    },
    {
      "browserName": "safari",
      "technologyPreview": false,
      "platform": "MAC",
      "maxInstances": 1,
      "seleniumProtocol": "WebDriver"
    }
  ],
  "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
  "maxSession": 5,
  "port": -1,
  "register": true,
  "registerCycle": 5000,
  "hub": "http://192.168.1.2:4444",
  "nodeStatusCheckTimeout": 5000,
  "nodePolling": 5000,
  "role": "node",
  "unregisterIfStillDownAfter": 60000,
  "downPollingLimit": 2,
  "debug": false,
  "servlets" : [],
  "withoutServlets": [],
  "custom": {},
  "webdriver.gecko.driver":"c:/drivers/geckodriver.exe",
  "webdriver.chrome.driver":"c:/drivers/chromedriver.exe"
}

amado-saladino avatar Dec 23 '18 19:12 amado-saladino