Selenium Grid code example

Example 1: selenium grid

Selenium Grid can be used to execute 
same or different test scripts on
multiple platforms and browsers
concurrently so as to achieve distributed test execution.

It allows running test cases in parallel
thereby saving test execution time.
It allows multi-browser testing.
It allows multi-OS testing.
It allows multi-platform testing (desktop, mobile).

Example 2: selenium grid configuration

java -jar selenium-server-standalone-2.53.1.jar -role hub -hubConfig hubconfig.json

Example 3: when do you use selenium grid

When do you use Selenium Grid?
Selenium Grid can be used to execute 
same or different test scripts on
multiple platforms and browsers
concurrently so as to achieve distributed test execution.

Example 4: advantages of selenium grid

It allows running test cases in parallel thereby saving test execution time.
It allows multi-browser testing.
It allows multi-OS testing.
It allows multi-platform testing (desktop, mobile).

Example 5: what is hub in selenium grid

A hub is a server or a central point
(Point of Contact) that controls the
test executions on different machines.

Example 6: what is node in selenium grid

What is a node in Selenium Grid?
Node is the machine which is attached to the hub.
There can be multiple (preferably) nodes in Selenium Grid.
Selenium Grid uses a hub-node concept where 
you only run the test on a single machine
called a hub, but the execution will be done
by different machines called nodes. 

RemoteWebDriver driver=new RemoteWebDriver (new URL(hubIP), capability);

Tags:

Misc Example