🚀 Feature Proposal
Allow browser-specific configuration options to be passed as a json object and initialized via command line. This eliminates the need for the node json configuration file on the host machine.
Motivation
When node capabilities are initialized via the command line, there's no way to properly initialize browser-specific configuration options, since the capabilities list is being split on ',' character, then key/value pairs are split on '=' character.
Example
Here is the command line initialization of a node that instantiates headless versions of chrome and firefox, please see goog:chromeOptions and moz:firefoxOptions options:
java -Dwebdriver.chrome.driver=/opt/openqa/selenium/browsers/chromedriver-78.0.3904.70 -Dwebdriver.chrome.logfile=/opt/openqa/selenium/logs/node/chrome78_wdc-tst-se3grid-001.log -Dwebdriver.gecko.driver=/opt/openqa/selenium/browsers/geckodriver-v0.26.0 -Dwebdriver.firefox.logfile=/opt/openqa/selenium/logs/node/firefox60_wdc-tst-se3grid-001.log -Dselenium.LOGGER=/opt/openqa/selenium/logs/node/node_wdc-tst-se3grid-001.log -Dselenium.LOGGER.level=INFO -cp /opt/openqa/selenium/bin/selenium-server-standalone-3.141.59.jar:/opt/openqa/selenium/lib/* org.openqa.grid.selenium.GridLauncherV3 -role node -hub http://wdc-tst-se3grid-001.openqa.com:4444/grid/register -port 5555 -maxSession 5 -id wdc-tst-se3grid-001:5555 -capabilities browserName=chrome,version=78.0,maxInstances=5,platform=LINUX,seleniumVersion=3.141.59,acceptSslCerts=true,acceptInsecureCerts=true,takesVideo=false,instance=wdc-tst-se3grid-001,goog:chromeOptions={"args":["--headless","--disable-gpu"]} -capabilities browserName=firefox,version=60.8.0esr,maxInstances=5,platform=LINUX,seleniumVersion=3.141.59,acceptSslCerts=true,acceptInsecureCerts=true,takesVideo=false,instance=wdc-tst-se3grid-001,moz:firefoxOptions={"args":["-headless"],"binary":"/opt/openqa/selenium/browsers/firefox-60.8.0esr/firefox","log":{"level":"info"}}
Note:
The change has been made from the tag of selenium-3.141.59 and placed it on a branch called selenium-3.141.592_json, the specific file update is located here:
https://github.com/DeathBeforeDecaf/selenium/blob/639707ce9967efffd607c58a45e33dd696887267/java/server/src/org/openqa/grid/internal/cli/BrowserDesiredCapabilityConverter.java
Unfortunately I'm not familiar with using tags to interact with git (we generally use branches for releases) - so please forgive any stupid mistakes on my part.
🚀 Feature Proposal
Allow browser-specific configuration options to be passed as a json object and initialized via command line. This eliminates the need for the node json configuration file on the host machine.
Motivation
When node capabilities are initialized via the command line, there's no way to properly initialize browser-specific configuration options, since the capabilities list is being split on ',' character, then key/value pairs are split on '=' character.
Example
Here is the command line initialization of a node that instantiates headless versions of chrome and firefox, please see goog:chromeOptions and moz:firefoxOptions options:
java -Dwebdriver.chrome.driver=/opt/openqa/selenium/browsers/chromedriver-78.0.3904.70 -Dwebdriver.chrome.logfile=/opt/openqa/selenium/logs/node/chrome78_wdc-tst-se3grid-001.log -Dwebdriver.gecko.driver=/opt/openqa/selenium/browsers/geckodriver-v0.26.0 -Dwebdriver.firefox.logfile=/opt/openqa/selenium/logs/node/firefox60_wdc-tst-se3grid-001.log -Dselenium.LOGGER=/opt/openqa/selenium/logs/node/node_wdc-tst-se3grid-001.log -Dselenium.LOGGER.level=INFO -cp /opt/openqa/selenium/bin/selenium-server-standalone-3.141.59.jar:/opt/openqa/selenium/lib/* org.openqa.grid.selenium.GridLauncherV3 -role node -hub http://wdc-tst-se3grid-001.openqa.com:4444/grid/register -port 5555 -maxSession 5 -id wdc-tst-se3grid-001:5555 -capabilities browserName=chrome,version=78.0,maxInstances=5,platform=LINUX,seleniumVersion=3.141.59,acceptSslCerts=true,acceptInsecureCerts=true,takesVideo=false,instance=wdc-tst-se3grid-001,goog:chromeOptions={"args":["--headless","--disable-gpu"]} -capabilities browserName=firefox,version=60.8.0esr,maxInstances=5,platform=LINUX,seleniumVersion=3.141.59,acceptSslCerts=true,acceptInsecureCerts=true,takesVideo=false,instance=wdc-tst-se3grid-001,moz:firefoxOptions={"args":["-headless"],"binary":"/opt/openqa/selenium/browsers/firefox-60.8.0esr/firefox","log":{"level":"info"}}
Note:
The change has been made from the tag of selenium-3.141.59 and placed it on a branch called selenium-3.141.592_json, the specific file update is located here:
https://github.com/DeathBeforeDecaf/selenium/blob/639707ce9967efffd607c58a45e33dd696887267/java/server/src/org/openqa/grid/internal/cli/BrowserDesiredCapabilityConverter.java
Unfortunately I'm not familiar with using tags to interact with git (we generally use branches for releases) - so please forgive any stupid mistakes on my part.