Time for action – launching the hub - Selenium

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 a command prompt or console.

  2. Run the command:
    java -jar selenium-server-standalone-x.xx.xx.jar -role hub

  3. When that command executes, you should see some thing like the following screen shot:

  4. We can see that this is running in the command prompt or 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/grid/console. We can see a screenshot of that:

    What just happened?

    We have successfully started Selenium Grid Hub. This is the central point of our tests and Selenium Grid instances. We saw that when we start Selenium Grid it showed us what items were available according to the configuration file that is with the normal install. One thing to note is that if you need to change the port, you can pass in -port ####. Just replace the #### with the port number that you wish to use.

    We then had a look at how we can see what the grid is doing by having a look at the hub in a browser. We did this by putting the URL http://name of machine: 4444/grid/console where name of machine is the name of the machine that we would like to access with the hub. It shows what configured environments the hub can handle, what grid instances are available, and which instances are currently active.

    Now that we have the hub ready we can have a look at starting up instances.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Selenium Topics