Selenium nodes

As mentioned before, there are various ways to set up and distribute testing on the Selenium Grid nodes. For the purpose of showing the command-line options for each type of driver, let's use the dedicated browser type model for each node. Here are the requirements and command-line options for each type of browser node:

  1. Install Java 8+ on the VM.
  2. Update $PATH to include the Java path.
  3. Install the required browser on the node: Chrome, Firefox, Edge, Safari, and so on.
  4. Create a folder called /opt/selenium (Linux and macOS) or C:Selenium (Windows) and download selenium-server-standalone-3.x.x.jar to it.
  5. Download the driver for the browser type for the node (ChromeDriver, geckodriver, and so on).
  6. Create a bash (or PowerShell) script to run the server with the following commands in it:
// selenium_node.sh

java -jar /opt/selenium/selenium-server-standalone-3.x.x.jar
-Dwebdriver.gecko.driver=/opt/selenium/geckodriver
-role node

-nodeConfig /opt/selenium/selenium_node.json

In this example, to load any of the other browser type drivers, you would just replace the -Dwebdriver option with the appropriate driver name, such as -Dwebdriver.chrome.driver, -Dwebdriver.edge.driver, and so on.

All the Selenium standalone server node command-line options can be found by issuing the following command:

java -jar /opt/selenium/selenium-server-standalone-3.x.x.jar 
-role node -h

Options:

--version, -version, Default: false
-browserTimeout <Integer> in seconds, Default: 0
-capabilities, -browser <String>, Default: [Capabilities [{seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=firefox, maxInstances=5}], Capabilities [{seleniumProtocol=WebDriver, browserName=internet explorer, maxInstances=1}]]
-cleanUpCycle <Integer> in ms
-custom <String>, Default: {}
-debug <Boolean>, Default: false
-downPollingLimit <Integer>, Default: 2
-host <String> IP or hostname
-hub <String>, Default: http://localhost:4444
-hubHost <String> IP or hostname
-hubPort <Integer>
-id <String>, Defaults to the url of the remoteHost, when not specified.
-jettyThreads, -jettyMaxThreads <Integer>, default value (200) will be used.
-log <String> filename
-maxSession <Integer>, Default: 5
-nodeConfig <String> filename
-nodePolling <Integer> in ms, Default: 5000
-nodeStatusCheckTimeout <Integer> in ms Default: 5000
-port <Integer>, Default: 5555
-proxy <String>, Default: org.openqa.grid.selenium.proxy.DefaultRemoteProxy
-register, Default: true
-registerCycle <Integer> in ms, Default: 5000
-role <String>, Default: node
-servlet, -servlets <String>, Default: []
-timeout, -sessionTimeout <Integer>, Default: 1800
-unregisterIfStillDownAfter <Integer> in ms, Default: 60000
-withoutServlet, -withoutServlets <String>, Default: []
..................Content has been hidden....................

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