Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get diagnostic information from a Selenium hub when a node is failing?

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?

like image 651
Keith Bentrup Avatar asked Jan 18 '26 23:01

Keith Bentrup


1 Answers

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

like image 107
Keith Bentrup Avatar answered Jan 23 '26 21:01

Keith Bentrup



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!