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

Can you use multiple instances of Edge on a Selenium Grid Node?

Using the config below, I am only seeing one instance of Edge running on my node. When using chrome with a similar setup, I can run multiple browsers on the same node. Here is the config.json I am using: { "capabilities": [ { …
bnieland
  • 6,047
  • 4
  • 40
  • 66
3
votes
1 answer

how to get inspect code of website instead of HTML source code using Selenium Java

I know that website source code is different from inspect code functionality of the browser. For example if iframes are used source code does not contain integrated iframe data where as inspect element in browser shows integrated code of iframe. I…
3
votes
0 answers

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/openqa/grid/selenium/GridLauncherV3 : Unsupported major.minor version 52.0

I am trying to run selenium-server-standalone-3.0.0-beta3.jar with command as below java -jar C:\Selenium\selenium-server-standalone-3.0.0-beta3.jar -role hub But while running i am getting an exception as below: Exception in thread "main"…
Gags
  • 3,759
  • 8
  • 49
  • 96
3
votes
1 answer

Appium Grid hub sending wrong set of capabilities to nodes

I am trying to configure Appium Grid with below node configuration. -Hub is receiving proper capabilities from testng but hub is sending wrong capabilities to my only two nodes. (node configs are as follows ) Please do suggest where am I going…
3
votes
1 answer

Url /Ip to pass while creating RemoteWebDriver

While making RemoteWebDriver object we need to pass URL and DesiredCapability Object. Browsing through different tutorial on net I found that in some they were passing URL of Node while in others they were passing URL of HUB. Please clarify which…
brij
  • 217
  • 7
  • 19
3
votes
1 answer

When doing parallel testing with selenium grid, how are folders (used by each browser) created?

I'm running tests in selenium grid. Each node runs 1 browser. Some of the tests require file downloads to a network drive. Right now I have one download directory in the drive (shared across nodes and hub) that is used by all browsers. I was…
quldude
  • 507
  • 5
  • 16
3
votes
0 answers

How to run one test on several devices with appium and Python

I am trying Appium using Python language. And I have a simple script on Python for Android (just open app, find text and assert this text). I want to run this test on several devices. What I already did: I have created two Android emulators. Run…
Vadim Kovrizhkin
  • 1,575
  • 4
  • 16
  • 27
3
votes
2 answers

Running automate tests with appium and selenium grid only run in one device

I'm trying to have some mobile automated tests running with appium and selenium grid. Once i done all configuration stuff and added grid nodes, how do i run my tests parallely in both devices? Here's my setUp(): desired_caps = {} …
andrepm
  • 867
  • 4
  • 13
  • 31
3
votes
2 answers

Parallel Cucumber-JVM Selenium Grid Tests using Maven Surefire

I've been going around in circles trying to figure this out, it seems almost impossible to use cucumber with maven parallel options against a Selenium Grid cluster. My runner runs based on tags and should pick up about 5 or 6 feature files. I'm…
Andy
  • 31
  • 1
  • 3
3
votes
1 answer

How can I give sessions in a Selenium Grid an unlimited idle time, but clean up disconnected ones?

I have a selenium grid that uses the following config: { "port": 4444, "newSessionWaitTimeout": 2000 } and 2 nodes that use this config: { "capabilities": [{ "browserName": "chrome", "platform": "LINUX", "maxInstances": 8 }], …
Chris
  • 53
  • 1
  • 5
3
votes
1 answer

Selenium Grid: set chrome *binary* path

Note: I am not asking about setting the path of the chromedriver. I want to run a Selenium node with a specific version of Chromium as opposed to the default Chrome installed on the system. The webdriver doc says I would need to pass a…
billc.cn
  • 7,187
  • 3
  • 39
  • 79
3
votes
0 answers

Selenium python-grid-DefaultRemoteProxy unknown version,No route to host

I started selenium hub on machine1 (ubuntu), start the node2 on machine2 (Redhat 6). Both machines have the same version of selenium server=selenium-server-standalone-2.46.0.jar Problem: when I run test, it gives me error: [EXCEPTION] Message:…
3
votes
3 answers

How to upload file in webdriver on Safari (MAC)

I am trying to upload file to Safari(8.0.8) using webdriver. Can anyone confirm it is possible or not? I was searching this problem and I cant find clear information. My test environment: I run test at my local PC with Win7 and browser start at…
3
votes
1 answer

how to run more then one selenium testing suite on the same machine

I am using Java/Selenium webdriver with testng to run my test automation, i have many automated project, each project is using a testing suite.xml, how can i run two suites or more at the same time on the same machine, here is my code for the…
Ali Hamadi
  • 673
  • 3
  • 11
  • 26
3
votes
2 answers

Selenium Grid sending values to one browser in parallel

I'm trying to run selenium in parallel but I'm having some major issues. One major issue I have is that WebDriver sends all values to one browser then another time it'll work first OK for test then second test it'll not send any values and then…
frass
  • 125
  • 2
  • 18