Book Image

Learning Selenium Testing Tools - Third Edition

Book Image

Learning Selenium Testing Tools - Third Edition

Overview of this book

Table of Contents (22 chapters)
Learning Selenium Testing Tools Third Edition
About the Author
About the Reviewers

The Selenium Grid hub

Selenium Grid works by having a central point that tests can connect to, and then commands are pushed to Selenium Server nodes that are connected to the hub. The hub has a web interface that tells you about the Selenium Server and the browser instances connected to the hub, and if they are currently in use.

Launching the hub

Now that we are ready to start working with Selenium Grid, we need to set up the grid. This is a simple command that we run in the console or Command Prompt.

  1. Open Command Prompt or a console.

  2. Run the following command:

    java -jar selenium-server-standalone-x.xx.xx.jar -role hub
  3. When that command executes, you should see something like the following screenshot:

  4. We can see that this is running in Command Prompt or the console. We can also see the hub running from within a browser.

  5. We can enter http://nameofmachine:4444/grid/console where nameofmachine is the name of the machine with the hub. If it is on your machine, then you can enter http://localhost:4444...