Selenium Grid Node

title NodeWebDriver 
java -jar selenium-server-standalone-2.<last_version>.jar 
-Dwebdriver.ie.driver="ABSOLUTE_PATH\IEDriverServer.exe" 
-Dwebdriver.chrome.driver="ABSOLUTE_PATH\chromedriver.exe" 
-Dwebdriver.safari.bin="ABSOLUTE_PATH\Safari.exe" 
-Dwebdriver.opera.bin="ABSOLUTE_PATH\opera.exe" 
-Dwebdriver.chrome.bin="ABSOLUTE_PATH\chrome.exe" 
-Dwebdriver.ie.bin="ABSOLUTE_PATH\iexplore.exe" 
-role node 
-nodeConfig nodeconfig.json 
pause

Selenium Grid Hub

title HubWebDriver
java -jar selenium-server-standalone-2.29.0.jar 
-role hub 
-hubConfig hubconfig.json 
pause

nodeconfig.json

{
   "capabilities":
   [
      {
         "seleniumProtocol":"WebDriver",
         "browserName":"firefox",
         "maxInstances":1
      },
      {
         "seleniumProtocol":"WebDriver",
         "browserName":"internet explorer",
         "maxInstances":1
      },
      {
         "seleniumProtocol":"WebDriver",
         "browserName":"chrome",
         "maxInstances":1
      },
      {
         "seleniumProtocol":"WebDriver",
         "browserName":"opera",
         "maxInstances":1
      },
      {
         "seleniumProtocol":"WebDriver",
         "browserName":"safari",
         "maxInstances":1
      }
   ],
   "configuration":
   {
      "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
      "maxSession": 5,
      "port": 5531,
      "hubHost": "IP Address of the Hub",
      "register": true,
      "registerCycle": 5000,
      "hubPort": 4444
   }
}

hubconfig.json

{
   "host": null,
   "port": 4444,
   "newSessionWaitTimeout": 300000,
   "servlets" : [],
   "prioritizer": null,
   "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
   "throwOnCapabilityNotPresent": true,
   "nodePolling": 5000,
   "cleanUpCycle": 5000,
   "nodeTimeout": 360000,
   "timeout": 480000,
   "browserTimeout": 0,
   "maxSession": 5
}
share me!:))Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone
Print this page