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
223
votes
18 answers

Can Selenium WebDriver open browser windows silently in the background?

I have a Selenium test suite that runs many tests and on each new test it opens a browser window on top of any other windows I have open. Very jarring while working in a local environment. Is there a way to tell Selenium or the OS (Mac) to open the…
kevzettler
  • 4,783
  • 15
  • 58
  • 103
71
votes
4 answers

Selenium Grid: MaxSessions vs MaxInstances

I was wondering if anybody could shed some light on a Selenium question that has been giving us a bit of head scratching. We're confused on meaning of MaxSession and MaxInstances of Selenium Grid. We think that the MaxSession is the total number of…
Christian Clarke
  • 841
  • 1
  • 9
  • 9
36
votes
6 answers

Protractor - run multiple tests in parallel on different browsers

I can't find any information on how to set this up, but it seems like a pretty basic concept, so I'm sure there's an answer out there. I know how to run protractor on different browsers by setting the browserName property of the capabilities…
tennisgent
  • 14,165
  • 9
  • 50
  • 48
33
votes
19 answers

Cannot find firefox binary in PATH. Make sure firefox is installed

In Selenium Grid I am trying to execute a simple program and I'm getting Cannot find firefox binary in PATH though I have added the binary path in my code. My code and the error are given below. Code package Sample; import…
user2307574
  • 339
  • 1
  • 3
  • 6
28
votes
3 answers

What are the differences between 'Selenium-server-standalone.jar' and 'Selenium Client & WebDriver'?

What are the Implementations differences between 'Selenium-server-standalone.jar' and 'Selenium Client & WebDriver'. Following is the link from SeleniumHQ.org website…
ABCDEFG
  • 789
  • 7
  • 13
  • 21
28
votes
4 answers

Chromedriver is extremely slow on a specific machine using Selenium Grid and .net

Overview: Chromedriver works normally on one machine but extremely slowly on two other identical machines. Setup: Selenium Webdriver using .Net for coding and Selenium Grid for distributing the tests. MSTest is being used from within Visual Studio…
24
votes
10 answers

What is the best way to avoid NoSuchElementException in Selenium?

I have written few test cases in Selenium WebDriver using Java and execute them on grid (hub and multiple nodes). I have noticed that a few test cases fail due to NoSuchElementException. What is the best and robust way to avoid…
22
votes
0 answers

Unable to get browser console logs from a remote chrome browser

I am using python language bindings of selenium. The application under test is a WEBRTC application, which does write debug information to console logs of the browser. Need to get these log information when running the tests. I am able to get the…
22
votes
5 answers

Checking HttpResponse OK (200) with Selenium WebDriver

I am using Selenium Remote WebDriver. I read all links from csv file and run test against those links. But sometimes I get 404 response. Is there any way in Selenium WebDriver to check that we get HTTP response 200?
Aniruddha
  • 3,513
  • 6
  • 27
  • 38
19
votes
8 answers

WebDriver Chrome Browser: Avoid 'Do you want chrome to save your password' pop up

Every time my webdriver tests login into the application, 'Do you want chrome to save your password' pop up appears.. Is there a way to avoid this?? Please help. Thanks, Mike
18
votes
1 answer

How to configure Capybara to run tests in a dockerized Selenium Grid?

I have a suite of tests that I want to execute in a dockerized Selenium Grid. The tests are written in Ruby using RSpec and Capybara. Also worth noting: I'm using dinghy as a wrapper for docker-machine. A couple weeks ago I built a proof of concept…
mycargus
  • 2,538
  • 3
  • 23
  • 31
18
votes
1 answer

How to replace a capability-value in the Selenium Grid before passing to a node

Is their a way to change the values of the Capabilities in the Selenium Grid? I am already extending the org.openqa.grid.internal.utils.DefaultCapabilityMatcher in a java class to validate some values. Need a way to replace them as well before…
15
votes
1 answer

How to fix this Selenium Error: bind() failed: Cannot assign requested address (99)

I've installed the latest version of selenium via Docker: docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:latest and then ran this in my python console: from selenium import webdriver from…
vgoklani
  • 10,685
  • 16
  • 63
  • 101
14
votes
3 answers

Has anyone found a way to run C# Selenium RC tests in parallel?

Has anyone found a way to run Selenium RC / Selenium Grid tests, written in C# in parallel? I've currently got a sizable test suite written using Selenium RC's C# driver. Running the entire test suite takes a little over an hour to complete. I…
Peter Bernier
  • 8,038
  • 6
  • 38
  • 53
14
votes
1 answer

Properties for Selenium Grid Hub/Node Config

I'm going through a process of upgrading my Selenium Hub/Nodes to version 3.3. Everything works fine, but I want to make sure I have optimal configuration... problem is I can't find a complete list of Hub/Node properties anywhere. I've looked…
Gunderson
  • 3,263
  • 2
  • 16
  • 34
1
2 3
99 100