Setting supported browsers by a node

As we saw earlier, when we register a node with a hub, by default, the node is shown as supporting five instances of the Firefox browser, five instances of the Chrome browser, and one instance of Internet Explorer, irrespective of whether the node actually supports them. But to register your node with the browsers of your choice, Selenium Grid provides a browser option, using which we can achieve this. Let's say we want our node to be registered to support Firefox, Chrome, and Safari; we can do that using the following command:

java -jar selenium-server-standalone-3.12.0.jar -role node -hub http://192.168.0.1:1111/grid/register -browser browserName=firefox -browser browserName=chrome -browser browserName=safari ...

Get Selenium WebDriver 3 Practical Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.