3

I have a several webdriver nodes connecting to a single hub with nearly identical configuration. I have a simple test that loads a URL and takes a screen shot. Sometimes a test will fail on one run and pass on the next. The only difference should be which node executes the test. The problem is I don't know which ran the test and checking the logs of each node is time consuming.

Is there a way to retrieve from the hub which node was asked to run the test?

I'm using the python bindings, and when I inspect the object returned from webdriver.Remote("http://myhub:4444/wd/hub", browser), I don't see any methods or properties that store this information.

I also don't see any information about the remote webdriver being passed in the network traffic between the hub and my machine that's directing the hub. Of course, it could be that I'm not sending a query to the hub to request the information. The only information that seems relevant that is being passed is a session id.

Suggestions?

Charles
  • 50,943
  • 13
  • 104
  • 142
Keith Bentrup
  • 11,834
  • 7
  • 49
  • 56
  • possible duplicate of [RemoteWebDriver and Grid - is it possible to get the server ip?](http://stackoverflow.com/questions/7190362/remotewebdriver-and-grid-is-it-possible-to-get-the-server-ip) – Keith Bentrup Feb 22 '12 at 22:27
  • Similar question: http://stackoverflow.com/questions/7608363/selenium-grid-identify-webdriver-node-where-a-test-failure-occured – sleske Apr 17 '12 at 08:16

2 Answers2

1

Found what I needed in this question. The query url would be http://hub:4444/grid/api/testsession?session=MY_SESSION_ID.

Community
  • 1
  • 1
Keith Bentrup
  • 11,834
  • 7
  • 49
  • 56
0

Can't you just grep the output log of the Selenium hub with the sessionID, you'll then see which node executed the test.

Jochen
  • 1,853
  • 3
  • 20
  • 28
  • I'm not seeing the sessionID in the output log of the hub even when launching the stand alone server with the '-debug' option. Do you have a sessionID in your hub output log? If so, what options are you invoking it with? – Keith Bentrup Jan 26 '12 at 19:47