Yes, there are 2 configuration params in Selenium 3 related to your issue:
- maxInstances: how many instances for the same type you can run on your node;
- maxSession: how many sessions for all types you can run on your node.
For example, in case you want to run tests for Chrome and IE:
maxSession = 10 it means that on your node only 10 sessions from both Chrome and IE can run.
Then, you can define how many to run of each type, in the specific browser settings command:
-browser "browserName=chrome,maxInstances=6"
-browser "browserName=IE,maxInstances=4"
Hence, the maxSession is the total number of all instances.
By default, I belive is 5, but you can change it by adding this to your command:
SOLUTION: java -Dwebdriver.chrome.driver = <chromedriver_path> -jar selenium-server-standalone-3.9.1.1.jar -role node -hub "https://localhost:4444/grid/register/" -browser "browserName=chrome,maxInstances=10" –maxSession 10
Sources:
https://www.softwaretestinghelp.com/selenium-grid-selenium-tutorial-29/#maxSession
Selenium Grid: MaxSessions vs MaxInstances
For SELENIUM 4, it's a bit different as you need 2 parameters:
- one to override the default max sessions setting: --override-max-sessions true
- one to establish the number of sessions that you want: --max-sessions 20
Command example: java -jar selenium-server-4.0.0-rc-3.jar node --detect-drivers true --max-sessions 20 --override-max-sessions true
Sources:
https://testingbootcamp.com/parallel-testing-with-selenium-grid-and-integration-with-jenkins-9d959dddbc1c
https://www.selenium.dev/documentation/grid/configuration/toml_options/
https://webelement.click/en/selenium_grid_4_complete_guide_to_configuration_flags#_override_max_sessions