What happened?
If I use Selenium Server 4.8.2 or 4.8.3 to start Chrome, the server ignores the Chrome binary path I specify in ChromeOptions object, and runs Chrome from the default system location instead. Selenium Server 4.8.1 did not have this issue.
How can we reproduce the issue?
First start a local standalone Selenium server, e.g., with the following command:
java -jar selenium-server-4.8.3.jar standalone
Then run the following Python script:
from selenium import webdriver
opt = webdriver.ChromeOptions()
opt.binary_location = '/path/to/chrome'
driver = webdriver.Remote('http://localhost:4444/wd/hub', options=opt)
driver.get('chrome://version')
input()
driver.quit()
While the chrome://version page is displayed, it shows (under "Command Line" heading") that Chrome is running from a default system location, instead of from the location specified in the script.
If I use selenium-server-4.8.1.jar instead, then the code works correctly. Bisecting Selenium code shows that the issue was introduced by 807bb7d. This commit adds a ChromeOption object in the stereotype capability. When this stereotype option is merged with the user-supplied option, the merge code (https://github.com/SeleniumHQ/selenium/blob/selenium-4.8.3-java/java/src/org/openqa/selenium/grid/node/config/SessionCapabilitiesMutator.java#L155) ignores the "binary" option supplied by the user.
### Relevant log output
```shell
N/A
Operating System
Have observed this on Linux and MacOS
Selenium version
Selenium Server 4.8.3; Selenium Python 4.5.0
What are the browser(s) and version(s) where you see this issue?
Tested with Chrome 112.0.5615.121, though it should repro with any recent Chrome version
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 112.0.5615.49
Are you using Selenium Grid?
Selenium Server 4.8.3 running in standalone mode
What happened?
If I use Selenium Server 4.8.2 or 4.8.3 to start Chrome, the server ignores the Chrome binary path I specify in ChromeOptions object, and runs Chrome from the default system location instead. Selenium Server 4.8.1 did not have this issue.
How can we reproduce the issue?
First start a local standalone Selenium server, e.g., with the following command: java -jar selenium-server-4.8.3.jar standaloneThen run the following Python script:
While the chrome://version page is displayed, it shows (under "Command Line" heading") that Chrome is running from a default system location, instead of from the location specified in the script.
If I use selenium-server-4.8.1.jar instead, then the code works correctly. Bisecting Selenium code shows that the issue was introduced by 807bb7d. This commit adds a ChromeOption object in the stereotype capability. When this stereotype option is merged with the user-supplied option, the merge code (https://github.com/SeleniumHQ/selenium/blob/selenium-4.8.3-java/java/src/org/openqa/selenium/grid/node/config/SessionCapabilitiesMutator.java#L155) ignores the "binary" option supplied by the user.
Operating System
Have observed this on Linux and MacOS
Selenium version
Selenium Server 4.8.3; Selenium Python 4.5.0
What are the browser(s) and version(s) where you see this issue?
Tested with Chrome 112.0.5615.121, though it should repro with any recent Chrome version
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 112.0.5615.49
Are you using Selenium Grid?
Selenium Server 4.8.3 running in standalone mode