mcool
mcool

Reputation: 785

Configure Selenium Nodes without a JSON file

I am using Amazon Web Services to host a Selenium Hub and Selenium Nodes.

I launch the hub like this:

java -jar selenium-server-standalone-3.141.59.jar -role hub -port 4444;

And I launch the nodes like this:

java -jar -Dwebdriver.chrome.driver=chromedriver selenium-server-standalone-3.141.59.jar -role node -hub http://10.0.1.119:4444/grid/register

This gives me a configuration like this: CONFIG

As you can see, this configuration for the node contains Firefox capability and MaxInstances is set to 5.

How can I change this so that Firefox is NOT allowed (but Chrome is) and change the MaxInstances to 2 without using a JSONconfiguration file. I am using UserData, so I am not able to use an external file, I can only script it.

How can I achieve this?

Upvotes: 0

Views: 245

Answers (1)

Michael Mintz
Michael Mintz

Reputation: 15556

When launching nodes:

java -jar -Dwebdriver.chrome.driver=chromedriver selenium-server-standalone-3.141.59.jar -role node -hub http://10.0.1.119:4444/grid/register -browser browserName=chrome,maxInstances=2,version=latest,seleniumProtocol=WebDriver

Upvotes: 2

Related Questions