Selenium: The Difference Between a Role Host and a Web Relay Role?

I use Selenium for automatic testing. What's the difference between

java -jar selenium-server-standalone-2.24.1.jar -role hub 

and

 java -jar selenium-server-standalone-2.24.1.jar -role webdriver 

?

It seems the same. Or is there any difference?

+4
source share
2 answers

Quote from the official wiki page :

A hub is a central point that will receive the entire test request and distribute the necessary nodes to them.

Regardless of whether you want to run a grid with new WebDriver functionality or a network with Selenium 1 RC functionality, or both, you use the same selenium-server-standalone jar file to start nodes.

My personal thought: node is used for Selenium 1 (RC) and webdriver for selenium 2 (webdriver). In my personal setup I use the webdriver role

If the wiki is not enough, I suggest you join the Selenium user group

+1
source

It all depends on the capabilities of the node, below the json file the values โ€‹โ€‹of seleniumProtocol are displayed and based on the fact that it reflects RC and Webdrivers on the grid.

  "capabilities": [ { "browserName": "*firefox", "maxInstances": 2, "seleniumProtocol": "Selenium" }, { "browserName": "*googlechrome", "maxInstances": 2, "seleniumProtocol": "Selenium" }, { "browserName": "*iexplore", "maxInstances": 1, "seleniumProtocol": "Selenium" }, { "browserName": "firefox", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "chrome", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "internet explorer", "maxInstances": 1, "seleniumProtocol": "WebDriver" } 

It always shows RC and webdriver in the grid, whether we set node or webdriver on the command line

enter image description here

0
source

All Articles