Selenium Grid: identify WebDriver node where testing failed

We use Selenium WebDriver to test our web application, and we run tests through Selenium Grid 2.

This usually works well, but some tests randomly fail through the selenium grid. Usually the error message is "error zip file".

We tracked this down to a problem in the WebDriver node that was used in this test - it usually popped up a dialog box that apparently blocked the test run.

To further diagnose this problem, it would be useful to see on which WebDriver node the test failed. Unfortunately, although the standard error message from RemoteWebDriver contains version and system information, it does not include the host name:

org.openqa.selenium.WebDriverException: error reading zip file; duration or timeout: 83 milliseconds Build info: version: '2.6.0', revision: '13840', time: '2011-09-13 16:51:41' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.18-194.32.1.el5', java.version: '1.6.0_20' 

In addition, this is, apparently, only information for the system on which the Selenium test is run, and not the system on which the browser is running (i.e. WebNode).

Is there a way to find out the name of the node where the test failed? Or should I consider submitting an improvement request using the Selenium project?

There is a related question: Selenium 2 Grid - know which node your test uses , but it is a little more general, asking how the test itself can find its machine when it starts.

+4
source share
1 answer

You can determine which node your test (browser) is running.

Check out these links:

Binding Java and C #: http://www.martin-walton.me.uk/2013/01/get-host-of-webdriver-grid-node/

Ruby bindings http://www.martin-walton.me.uk/2013/02/get-host-of-webdriver-grid-node-in-ruby/

+2
source

All Articles