Creation of Selenium grid 4 using plugin in Jenkins

In Selenium 3 the grid could be started using a plugin with name “Selenium”, however there is no such plugin in Jenkins for Selenium 4. So instead of using the command window can we use Jenkins to start the hub and node? If so what is the process?

Hi Mukul,

In Selenium 4, yes you can use Jenkins to start the hub and node instead of using the command window.

Steps to Start Selenium Grid in Jenkins:

  1. Create a New Jenkins Job:
  • Go to “New Item” in Jenkins and create a Freestyle Project.
  1. Add Build Steps:
  • In the job configuration, add an “Execute Shell” or “Execute Windows Batch Command” build step.
  • Use the following commands:
  1. To Start the Hub:

java -jar /path/to/selenium-server-4.x.x.jar hub

4.To Start the Node:

java -jar /path/to/selenium-server-4.x.x.jar node --hub http://localhost:4444

  1. Run the Job:
  • Save and run the job to start the hub and node.

Could you please try this? Let me know if you are facing any issues or any other queries.