Understanding the node

As our hub is up and running, it's now time to start a node and connect it to the hub. In this example, we will configure a macOS machine that has Chrome installed on it. So, if any test script requests the hub for a macOS platform and Chrome browser, the hub will choose this node. Let's see how we can start the node. The command to start the node and register with the hub is as follows:

java –jar selenium-server-standalone-3.12.0.jar –role node –hub http://192.168.0.101:1111/grid/register

This will start the Selenium server in the node mode and register this node with the already-started hub:

If you go back to the Grid Console on the browser, you will see the following:

The preceding screenshot shows the http://192.168.0.101:16784 node URL, which, in this case, is running on the Mac platform. By default, the number of browsers listed for every node is 11: 5 for Firefox, five for Chrome, and one for IE. This can be overridden by specifying the browser option, which we will see in the Configuring Selenium Grid section. 

Similarly, start another node on Windows and register to the hub using the same command used to start the node on macOS.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.98.108