Example
Creating a hub
A quick configuration for a hub and node setup in selenium grid. For more information see: Grid 2 docs
Requirements
To set up a grid hub you need the flowing:
Creating the hub
To Create a Hub you need to run the selenium server.
- Download Selenium-server-standalone-.jar
- Open your terminal and navigate to the folder where Selenium-server-standalone-.jar is
- Execute the folowing command:
- For default configuration
java -jar selenium-server-standalone-<Version>.jar -role hub
- For Json configuration
java -jar selenium-server-standalone-<Version>.jar -role hub -hubConfig hubConfig.json
- Open http://localhost:4444/ you will see a message a follows
On clicking console
-> View config
for to view the Configuration for the hub details.
Creating a Node
Requirements
To set up a grid hub you need the flowing:
- Selenium-server-standalone-.jar
- Webdrivers
- Browsers
Creating the Node
Now To create Nodes for the Hub
- Download Selenium-server-standalone-.jar
- Download the browsers you want to test in
- Download the drivers for the browsers you want to test in
- Open new terminal and navigate to the selenium server jar file location
- Execute the folowing command:
- for default configuration
java -jar selenium-server-standalone-<VERSION NUMBER>.jar -role node
- For Json configuration
java -jar selenium-server-standalone-<Version>.jar -role node -nodeConfig nodeConfig.json
- Now go to http://localhost:4444/grid/console to view the node details