Hà Perfect
Hà Perfect

Reputation: 1

Selenium 3 - Add Port for Node when run Selenium Grid

At the moment, I am configuring Hub and Nodes for a Selenium 3 Grid setup.

Question: I want to have the Node connecting to my Hub through a predefined port (-port 5555). How should I configure the port property for the Node?

!!! Note: with Selenium 2, I successfully configured the node with port 5555: java -jar selenium-server-standalone-2.53.0.jar -role webdriver -hub http://10.0.12.110:4444/grid/register -port 5555 -browser "browserName=chrome,version=ANY,platform=WINDOWS" -Dwebdriver.chrome.driver=c:\WS\chromedriver.exe -browser

However, property -port 5555 doesn't seem to work/have effect in Selenium 3.

How can I make it work?

Upvotes: 0

Views: 2728

Answers (1)

Igor Lantushenko
Igor Lantushenko

Reputation: 1791

You can create node-config.json file and store port parameter there. Format of config file:

{
    "capabilities": [
        {
            "browserName": "chrome",
        }
    ],
    "port": 5555,
}

Then start your node with

java -jar /path_to_driver/serve.jar -role node -hub HUB_ADDRESS -nodeConfig /path_to_node_config/node-config.json

More config options you can find HERE Detailed about configuration in Selenium 3

Upvotes: 1

Related Questions