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

Selenium Grid: Error communicating with the remote browser. It may have died

I have two machines, one with all the stuff I need (Eclipse + TestNG +scripts) and the other one with just browsers installed. I use Selenium Grid 2.35.0. Everything seems to be fine except the problem that very often I get this error: Error…
user1944151
  • 353
  • 1
  • 4
  • 16
5
votes
3 answers

Is there any video recorder for Selenium WebDriver?

i am working in Selennium Webdriver2 with IE specific application. i know we can take the screenshots of the execution. similarly, Is there any option to record selenium execution as a video?
Karthikeyan
  • 2,634
  • 5
  • 30
  • 51
5
votes
5 answers

Selenium Grid with parallel testing using C#/NUnit

I've got several unit tests written with NUnit that are calling selenium commands. I've got 2 win2k3 server boxes setup, one is running selenium grid hub along with 2 selenium rc's. The other box is running 5 selenium rc's. All of them are…
seth
  • 171
  • 2
  • 8
5
votes
2 answers

Selenium Grid showing WebDriverException error

My Selenium Grid is showing an error: org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.chrome.driver system property; but I have specified it perfectly (according to my…
selva
  • 1,175
  • 1
  • 19
  • 39
5
votes
2 answers

iWebDriver - iphone Selenium

I have gotten this to work before so I know its possible, but trying it on a new machine. I have OS X 10.8.2, Xcode 4.6, iPad 6.1, and trying to do this: Iphonedriver selenium I get to the point where I am building the project in Xcode and get this…
user1684462
5
votes
3 answers

How can I identify the Selenium Grid host running my test from within the test?

I am using Selenium Grid with TestNG to run my tests in parallel. I have certain tests that require a user to be logged in, so I have a user account configured for testing. I have been careful to ensure that any tests involving logging in as my test…
Dave Hunt
  • 8,191
  • 4
  • 38
  • 39
5
votes
1 answer

Anyone Else Having Trouble Registering Ghostdriver with Selenium Grid?

I know that there is documentation on the ghostdriver wiki on how to attach it to a selenium grid. For those that don't know you can find it here I've compiled the special phantomjs twice, tried to attach it to selenium servers local, and remote…
SuperFamousGuy
  • 1,455
  • 11
  • 16
5
votes
4 answers

Not able to register selenium webdriver node on VM to the hub on Host

I have a host with IP 192.168.3.146. This IP is a static IP given from DHCP server. Now I have VM with network configured as Bridged. I am seeing the IP as 10.0.2.15. Since it's bridged should I be getting anything in the range 192.168.3.x…
user1134114
  • 61
  • 1
  • 3
5
votes
2 answers

Selenium Grid, how to utilize WebDriver with ThreadSafeSeleniumSessionStorage.session()

I am working on a project that involves using the Selenium WebDriver and a specific Firefox Profile heavily to find elements and manage the page. For example, driver.findElement(By.xpath("//*[@id='foobar']")); and driver.manage().refresh(); I…
5
votes
2 answers

How to close a ChromeDriver when running on Grid?

I am currently running my tests with RemoteWebDriver with Selenium Grid 2 through TestNG suites. This works fine with Firefox and IE. Now I added Chrome and the tests run fine, but I always get an Exception when calling driver.quit() after all tests…
Tarken
  • 2,112
  • 2
  • 23
  • 42
5
votes
4 answers

Automated Browser Testing using selenium, Nunit, Selenium Grid, C#, webdriver/remote control

I have been researching on how to automate browser testing for a number of weeks now using all kind of different methods. Seleniums website is very vague on which is the best route to take. I have installed Selenium Webdriver Remote…
lbrown
  • 615
  • 3
  • 10
  • 19
5
votes
2 answers

Selenium Grid does not run Chrome on another computer

I have this problem. When on different computer, I start HUB and NODE and then run my tests where I initialize Google Chrome like this: Selenium selenium = new DefaultSelenium("localhost", 4444, *googlechrome, "http://www.google.com"); …
Pavel Janicek
  • 14,128
  • 14
  • 53
  • 77
4
votes
2 answers

Issues updating desired_capabilities: Selenium WebDriver - Ruby

Super beginner here. Trying to update this test with Selenium WebDriver using Ruby the course I was going through uses the below which is deprecated. driver = Selenium::WebDriver.for :remote, desired_capabilities: :firefox The error I'm getting in…
4
votes
1 answer

Get node IP address for a single session id in selenium4 grid

We are moving from selenium 3 grid to selenium 4 grid(with hub & node setup). We need to be able to fetch IP address of node on which the current session is being executed on(session id is fetched from driver.getSessionId()) For selenium3 grid, we…
Shivam Mishra
  • 1,731
  • 2
  • 11
  • 29
4
votes
3 answers

RemoteWebDriver and Grid - is it possible to get the server ip?

I am using RemoteWebDriver from Selenium 2 and Grid to divide my tests on several virtual machines. Let's say I have two Linux machines and in a test I specify the capabilities to run on a Linux machine, I can't figure out which of these two…
tester
  • 3,977
  • 5
  • 39
  • 59