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
2 answers

Selenium 3.5 Options.ToCapabilities is not applying the options to RemoteWebDriver

I had a couple of cmd line options working with Selenium 3.3 as follows: `DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities = DesiredCapabilities.Chrome(); options.AddArguments("--lang=en-GB"); …
alex
  • 135
  • 3
  • 17
0
votes
1 answer

Cannot create FF/Chrome session on Selenium Standalone

Machine Details AME="Amazon Linux AMI" VERSION="2017.03" ID="amzn" ID_LIKE="rhel fedora" VERSION_ID="2017.03" PRETTY_NAME="Amazon Linux AMI…
Lgalan90
  • 595
  • 2
  • 12
  • 31
0
votes
1 answer

How to let the hub decide which node to execute during the parallel testing of the Selenium Grid?

I am performing the cross-browser testing (with TestNG) of my GWT Web Application using the Selenium Grid on 3 different machines A, B, and C. Machine A is working as the hub as well as the node. While the other two machines B and C are given the…
0
votes
2 answers

Docker & Selenium unable to connect to renderer

I am trying to setup browser testing with selenium and docker with behat. The main issue I am having is reliability when running the tests. Sometimes I can get connected and am able to run tests fine, but a lot of the time I cannot. It seems quite…
0
votes
1 answer

How to create a new file in every parallel test using TestNG + Selenium Grid?

I'm testing a GWT Web Application similar to Paint. In this, there is a test case on which I am working on and I have to test this on a different machine using Selenium Grid. Along with that, I'm testing this test case on 2 browsers by executing…
KhiladiBhaiyya
  • 633
  • 1
  • 14
  • 43
0
votes
2 answers

Windows firefox and MAC chrome maximize command not working

In selenium using driver.manage().window().maximize(); the command I Maximize my browser its working fine for my windows chrome but when I run the test case on MAC PC chrome browser or any Mozilla browser it does not maximize my browser? Is there…
Zakaria Shahed
  • 2,589
  • 6
  • 23
  • 52
0
votes
1 answer

Unable to Take Screenshots Using Firefox Nodes

My Selenium tests are designed to take screenshots on failure and add them to the report. The screenshots are displaying perfectly for chrome browsers, but Firefox screenshots are just white rectangles.The changelog says something about a "pass…
atg
  • 127
  • 2
  • 13
0
votes
0 answers

Selenium Hub requests capabilities do not match with browser node capabilities

I'm trying to point some tests at a selenium hub that I have set up and I'm coming across some possible issues with the configuration/capabilities of the browsers. When I look at the logs for the Hub Pod that I have set up in minikube, I see the…
appdap1
  • 521
  • 1
  • 6
  • 17
0
votes
0 answers

How to use modified libraries in Python 3.x

I have run against a really simple problem, but I cannot solve it properly. Namely I am running automated test cases written in Python 3 + Selenium. The tests are going to be executed in Docker to isolate the Python environment from the machine it…
glamredhel
  • 336
  • 3
  • 12
0
votes
1 answer

Kubernetes Deployment file error: Found invalid field selector for v1.PodSpec

I'm getting an invalid field selector error when I try and create my deployment using a YAML file. The error is error validating data: found invalid field selector for v1.PodSpec and my file can be seen below. apiVersion: apps/v1beta1 kind:…
appdap1
  • 521
  • 1
  • 6
  • 17
0
votes
2 answers

Not able to implement selenium grid

Below is my code which I am using to pass browser, node and hub port to launch browser and execute the tests but i get exception although I am able to set up selenium server. I paste error below of the code too. I use mac book, Selenium 3.4, Firefox…
Ref
  • 27
  • 1
  • 8
0
votes
4 answers

opening a html file on remote machine using remote webdriver says "file not found"

My tests are in git, and I am running them on the grid using Remote Webdriver. I have to open a static HTML in grid. For this, I have checked in the HTML file in the same git repo where my testis. I have something like below in my test to open the…
learner
  • 475
  • 3
  • 9
  • 23
0
votes
0 answers

Download file to local folder using Capybara running tests on grid

I'm having trouble with tests that download/export a CSV only when running against the grid. When the tests run locally, they are fine. It's because of the way we download and check the file: module DownloadHelpers TIMEOUT = 10 PATH =…
0
votes
1 answer

Selenium grid is not working for a rookie example

I can't get Selenium grid working. I've included screen shots below to help. Can anyone see what's wrong? I've almost given up, looking at tutorials/ articles/ videos out there what I've tried below should work but it doesn't. Can anyone…
user7558986
  • 65
  • 2
  • 8
0
votes
2 answers

unable to Launch Selenium Script in Grid

i have started selenium server hub by running command : java -jar selenium-server-standalone-3.4.jar -port 4444 -role hub i have also connected node by running the command : java -jar selenium-server-standalone-3.4.0.jar -role node -hub…
jaibalaji
  • 3,159
  • 2
  • 15
  • 28