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

Execution not starting in node desktop when i am using Selenium GRID

Execution not starting in node desktop when I am using Selenium GRID. Here I tried to launch Firefox browser in node desktop. How can I solve this issue? Your answers could be appreciated.Thanks in advance. **Below is my code** public class…
Krishna
  • 21
  • 1
  • 6
0
votes
1 answer

Possible to run x3 tests simultaneously on one node using the same Browser?

Possible to run x3 tests simultaneously on one node using the same browser? My test involves adding x1 to the basket. Is this even possible when cookies are involved because the same browser is being used therefore wouldnt the following scenrio…
Gbru
  • 1,065
  • 3
  • 24
  • 56
0
votes
1 answer

OWASP ZAP JVM contention with same Selenium Grid ports

I am attempting to run Selenium automation scripts through the selenium grid server with ZAP sitting on the same port analyzing the thru traffic. However, I am having a point of contention with both (selenium grid & ZAP) JVM's sitting on the same…
0
votes
1 answer

"An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll" error coming up

I am running a simple code to launch the Firefox browser. Running it in Visual Studio. Below is the code: IWebDriver driver3 = new RemoteWebDriver( new Uri("http://localhost:4444/wd/hub"), …
0
votes
2 answers

Define location of selenium chromedriver executable in node config json (3.0.1)?

I know I can define the location of the chrome driver executable when I launch a selenium grid node like so: -jar -Dwebdriver.chrome.driver="C:\chromedriver.exe" selenium-server-standalone-3.0.1.jar -role node -nodeConfig. nodeConfig.json But how…
kroe761
  • 3,296
  • 9
  • 52
  • 81
0
votes
0 answers

Selenium remotewebdriver stuck before launching browser

I'm trying to launch Firefox remotely on a windows machine from UNIX box using remotewebdriver I am also starting the selenium node remotely using ssh(It starts fine) using Cygwin and OpenSSH. (I've installed firefox in the path…
0
votes
0 answers

Running Selenium Tests using TestNG in parallel causes errors

I am building a selenium grid framework using two VM's as nodes (chrome in one, Firefox in the other). When I run my sample test in series, they work with no issues. When I run them in parallel, however, the test in Chrome does only goes as far as…
kroe761
  • 3,296
  • 9
  • 52
  • 81
0
votes
1 answer

Selenium Grid node dropping/reconnecting every 30 seconds, Error: "DefaultRemoteProxy unknown version" in the console

I am trying to write some selenium grid (3.0.1) tests and using VirtualBox Windows VM's to test the framework. I can connect a hub to a node on the same machine (Mac or Windows, VM or real) with no issues. I can also connect my Mac to a co-workers…
kroe761
  • 3,296
  • 9
  • 52
  • 81
0
votes
1 answer

Selenium grid routing to wrong nodes

I have the selenium grid 3.0.1 setup with a single hub and three nodes as follows: First Node: linux with Chrome and Firefox Second Node: Windows 10 with Chrome, Firefox, Edge and Internet Explorer Third Node: Linux with Appium running with an…
pragman
  • 1,564
  • 16
  • 19
0
votes
1 answer

Can't connect my 'BrowserFactory' to 'Selenium Grid'

I can't connect my BrowserFactory to Selenium Grid. Any ideas why the following code won't work? public static WebDriver getDriver() throws Exception { try { // Load the driver selected by user Properties p = new Properties(); …
Gbru
  • 1,065
  • 3
  • 24
  • 56
0
votes
2 answers

Selenium Grid Node cannot connect to Hub

I am trying to initiate a Selenium Grid hub on my Mac and then set up a node on a Windows 7 VM also on my Mac (running in VirtualBox, if that matters). I am running this command on the Mac: java -jar selenium-server-standalone-3.0.1.jar -role…
kroe761
  • 3,296
  • 9
  • 52
  • 81
0
votes
1 answer

DesiredCapabilities 'Chrome' > doesn't work with 'Selenium Grid'

DesiredCapabilities 'Chrome' > doesn't work with 'Selenium Grid. I have a hub setup correctly and a node however when trying to point Chrome browser to one of the nodes it doesn't work. Current code: case "chrome": if (null…
Gbru
  • 1,065
  • 3
  • 24
  • 56
0
votes
1 answer

Selenium and java servlet and javaScript

I have a situation in which I want Selenium webdriver to run on client. I have a webpage with Submit button inside form. In form's action attribute I am calling servlet action="servletName". Now in servlet I have…
0
votes
1 answer

Is it possible to download excel or CSV report file in selenium grid at desire location?

I am trying to download excel and CSV report file in Selenium Grid but can't able to see downloaded file at desire location. FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("browser.download.folderList",…
0
votes
1 answer

How to run script when selenium node is idle (Selenium grid)

Is there any way to trigger a .bat script when a selenium node is idle? I have a selenium grid setup consisting of one hub and three nodes on separate machines. What i'm trying to do is to have a script that cleans up the testing environment on…
Agent Shoulder
  • 586
  • 8
  • 22
1 2 3
99
100