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 got this info from <hub url>/grid/api/testsession?session=<sessionId>
I cannot find an equivalent endpoint for selenium 4 grid. I could find graphql query parameters but it fetches details for ALL the sessions. I need to find session details only for ONE session id.
Any help?
Note: Based on how the question is formulated I assume we are talking about node URI, which it's not always precise IP address of it. Having the URI it shouldn't be difficult to find the real ip, if indeed needed. Taking this into account...
GraphQL endpoint is the place to go. You can narrow the results by querying for specific sessionID (which you can get from webdriver as you pointed out).
cUrl example:
Prototype in node.js:
Prints out:
Tested using a quick setup of selenium grid docker
Grid GraphQL documentation