Questions tagged [selenium-grid]

Selenium-Grid allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, Selenium-Grid support distributed test execution. It allows for running your tests in a *distributed test execution environment*.

Selenium Grid is a component of the Selenium project that allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. The tests can be run on any number of machines at the same time.

It provides both environment management and resource allocation as it dispatches your tests against nodes in the grid. The environment management allows you to exert finer-grained control over the environment executed in than Selenium Server provides itself. For example, you can target your tests at specific browser versions or particular platforms.

Selenium Grid consist of HUB and Node. Selenium stand alone server jar executable can work as both Node and Hub. In order to configure Grid there must be a single HUB (selenium server running as HUB), and one or more Nodes (selenium server running as Node) attached to the HUB.

PROS AND CONS

Selenium Grid isn't a silver bullet. It solves a subset of common delegation and distribution problems, but will for example not manage your infrastructure and might not suite your specific needs.

Pros

  1. Scale. Scale by distributing tests on several machines using parallel execution.
  2. Central. Manage multiple environments from a central point, making it easy to run the tests against a large combination of browsers and operating systems.
  3. Minimize. Minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage a virtual infrastructure of registered nodes.
  4. Cross-Platform. If your tests are running on one particular platform, by using a node on another platform you effectively have cross-platform testing.
  5. Smart. Grid can route commands to a certain version of a browser if you have two or more nodes registered, each pointing to a different version of the browser binary.

Cons

  1. Prompted input. You have no capabilities for user input if your tests want to prompt for user input whereas you would if your tests ran locally.
  2. Maintainability. You also need to maintain the health of other computer systems which run your nodes.
  3. Limited power. Certain third party libraries have limitations that prevent them from being used in conjunction with Grid.

References:

  1. Selenium Grid docs on seleniumhq.github.io
  2. Selenium Grid docs on seleniumhq.org
  3. Running Standalone Selenium Server form command line
  4. Selenium to Start Hub Server and register Nodes with Hub
1873 questions
0
votes
1 answer

Selenium Grid - Specified number of threads not getting fully occupied

I have specified the number of threads as 20 for 300 test cases. When the test run starts it occupies all the 20 threads and completes over 270+ test cases, after that the thread occupancy is getting reduced to very few and by the end it is running…
Vignesh Paramasivam
  • 2,360
  • 5
  • 26
  • 57
0
votes
1 answer

Capabilities error after using selenium grid and Webdriver manager

I have been using [webdriver manager][1] for local executions, it has been outstanding, however right now I'm trying to use a selenium grid and I would like to use the same approach but I'm getting some errors related to capabilities. The hub and…
0
votes
1 answer

Can BDD NUnit test cases run parallel in selenium Grid?

I have a BDD framework and using NUnit for test execution.I am trying to implement selenium grid wherein as the default configuration ,I have 5 instances of chrome , firefox and 1 of IE. However when i select multiple tests from VS to run from a…
NRT
  • 125
  • 2
  • 11
0
votes
1 answer

Can't start 'Matching Configurations' on running/connected Selenium Grid Node

I actually have two issues which are related. I can't start the 'matching configurations' on the Selenium Grid nodes (listed under 'nodes matching configurations') connected to the Grid server running under Jenkins. I am also not able to locate…
GIZNAJ
  • 501
  • 5
  • 23
0
votes
2 answers

How to fully close Opera browser via RemoteWebDriver

I'm attempting to add Opera to a node on our Selenium Grid but running into a problem closing the Opera browser. In Opera, closing the last tab in a browser does not close the browser. It instead launches something called Speed Dial. This is…
Nick
  • 110
  • 1
  • 1
  • 10
0
votes
0 answers

Selenium RemoteWebDriver immediately crashes with InvalidOperaitonException

I'm trying to get selenium hub to work. Whenever I try to create the RemoteWebDriver, it crashes with System.InvalidOperationException with no message, InnerException etc. My machine is on Windows 8.1; I'm using docker toolbox to run a hub…
Stuart Moore
  • 681
  • 5
  • 32
0
votes
1 answer

selenium grid is not starting more than 5 sessions

I have done grid setup as follows: Hub: iMAC Started with: java -jar Downloads/selenium-server-standalone-2.52.0.jar -port 4444 -role hub Node1: Win8 system Started with: java -Dwebdriver.chrome.driver=chromedriver.exe -jar…
0
votes
2 answers

How to run test cases on Safari on Selenium Grid with Windows 10 machine as hub and MAC machine as node

Details: Windows version: 10 , 64 bit MAC: macOS Sierra 10.12.5 Safari: 10.1.1 Selenium: 3.4.0 Started hub on Windows machine with below command and successfully started java -jar selenium-server-standalone-3.4.0.jar -role hub -port 4444 Started…
SeJaPy
  • 284
  • 1
  • 6
  • 18
0
votes
0 answers

Selenium RemoteWebDriver failing

I have downloaded the Selenium server 3.0.0 into my C:\SeleniumGrid\ folder and setup the hub and node using separate command consoles. I've included the logs below. When running my automation scenario on my machine (same machine as the selenium…
user7558986
  • 65
  • 2
  • 8
0
votes
2 answers

How to perform parallel cross browser testing with selenium grid testng data provider

I am trying to run a parallel test with chrome and Firefox using selenium grid and TestNG. I am using @DataProvider to make it data driven with single excel file However, one of the browser get closed every time I try to run my suite and throws the…
0
votes
0 answers

CSharp exception when trying to use Selenium grid

I am receiving the following error when trying to launch my automation tests using selenium grid. I have the hub running after launching this command. When I browse http://10.1.27.27:4441/grid/register I receive this error message: HTTP ERROR…
user7558986
  • 65
  • 2
  • 8
0
votes
1 answer

Selenium grid not able to get it working

I've executed the following hub and node commands in my windows command prompts. I can see this is working as I get the grid console when browsing http://localhost:4441/grid/console C:\seleniumserver\java -jar selenium-server-standalone-3.4.0.jar…
user7558986
  • 65
  • 2
  • 8
0
votes
1 answer

Selenium Grid Proxy: how to get the response after a command get executed

I created a Selenium Grid proxy, I want to log every command done, the problem is I can't find a way to get the response of the command for example after "GetTitle" command I want to get the "Title" returned.
Elheni Mokhles
  • 3,801
  • 2
  • 12
  • 17
0
votes
0 answers

Running Chrome and IE tests in parallel in same node

What are the issues occur due to running IE and Chrome/Firefox browsers tests in parallel in the same node. As nativeEvents, requireWindowFocus, enablePersistentHover are enabled for IE, will it cause impact on tests running in chrome/firefox. If…
Vignesh Paramasivam
  • 2,360
  • 5
  • 26
  • 57
0
votes
1 answer

Python WebDriver .quit() gets error

My selenium tests run fine with local webdriver but fail when running against remote webdriver i.e. running against selenium grid built from SeleniumHQ docker images The tests are written in python and the selenium pip package I'm using is…
Nam G VU
  • 33,193
  • 69
  • 233
  • 372