Course Content
Selenium Python First Script
Selenium Python First Script
0/2
HTML Form elements
HTML Form elements
0/1
Handle HTML Frames
Handle HTML Frames
0/2
Handling Dropdown Lists
Handling Dropdown Lists
0/2
Selenium Action class
Selenium Action class
0/1
Selenium Python for Beginners [ 2024 ]
About Lesson

Selenium Grid Setup

To set up the Selenium Grid environment, you must download the Selenium Grid Server.

Download Selenium Server

Open a web browser.

Launch the following URL:

https://www.selenium.dev/downloads/

Download the Selenium server.

Grid Configuration Setup

The grid configuration involves two major steps.

  1. Setup the Hub
  2. Setup the nodes. You can setup multiple nodes on different machines registering to the hub.

Selenium Hub Setup

Open the command prompt.Change working directory to the folder where you downloaded the Selenium server jar file.

To set up the selenium hub, issue the following command:

/> java -jar selenium-server-standalone-<version>.jar -role hub

 

Selenium Hub Setup

The command line flag -role hub will start the server as hub. By default, the hub will start at port 4444. However, you can change this with -port command line flag. Avoid port conflicts with existing applications while using the port flag. 

For example, to start the hub at port 7777, you can use the flag -port 7777

Grid Console

The Grid console can be viewed on the browser. Open a web browser and launch the following URL:

 

Selenium Grid Console Browser

Selenium Node Setup

Selenium node setup is to register the node to the hub. Open the command prompt and issue the following command to register the node.

/> java -jar selenium-server-standalone-3.141.5.jar -role node -hub http://localhost:4444/grid/register -browser “browserName=chrome”

 

Selenium Node Register Setup

The register URL for the hub is:

  • http://localhost:4444/grid/register

However, you can replace it with the IP address or domain where the hub runs in a real-time environment.

This will register a Chrome node to the hub. The registered node should reflect in the grid console. Open the grid console and confirm that the node configuration is displayed.

 

Grid Console After Chrome Node

Join the conversation