KEMBAR78
Grid Notes | PDF | Computers | Technology & Engineering
0% found this document useful (0 votes)
45 views1 page

Grid Notes

To implement Selenium Grid, you first create a hub using the java -jar command. You then create nodes to run test cases in different browsers by running similar java -jar commands specifying the browser type, hub URL, and port. Scripts can then use the hub URL to initialize a RemoteWebDriver to run against the grid, specifying the desired browser and platform.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views1 page

Grid Notes

To implement Selenium Grid, you first create a hub using the java -jar command. You then create nodes to run test cases in different browsers by running similar java -jar commands specifying the browser type, hub URL, and port. Scripts can then use the hub URL to initialize a RemoteWebDriver to run against the grid, specifying the desired browser and platform.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Steps involved in Selenium Grid implementation

--------------------------------------------------------------------------------
Step 1: Creating Hub

Goto Command Prompt, then type

java -jar <Sele..jar file path> -role hub

Step 2: Create Node/s to execute TestCases in diff Browsers

2.1 Configure Node to execute TestCases in firefox browser

java -Dwebdriver.gecko.driver=<geckodriver.exe filepath> -jar <sele jar file


path>
-role webdriver -hub http://192.168.0.110:4444/grid/register -port 5555
-browser browserName=firefox,maxInstances=10

2.2 Configure Node to execute TestCases in Chrome Browser

java -Dwebdriver.chrome.driver=<chromedriver.exe file path> -jar <sele jar


file path>
-role webdriver -hub http://192.168.0.110:4444/grid/register -port 6666
-browser browserName=chrome,maxInstances=5

-----------------------------------------------------------------------------------
--
Script

DesiredCapabilities cap=null;
cap=DesiredCapabilities.chrome();
cap.setBrowserName("chrome");
cap.setPlatform(Platform.WINDOWS);

URL huburl=new URL("http://192.168.0.110:4444/wd/hub");


RemoteWebDriver driver=new RemoteWebDriver(huburl, cap);

driver.get("http://orangehrm.qedgetech.com");

You might also like