I am building a test automation framework using a grid configuration of Windows machines. Without going into too much needless detail, I'm running the tests off a server running Robot Framework with Selenium2Library, which runs the test session through a hub that selects a node based on the browser & OS I selected. Standard stuff, and it all works fine; however on occasion a test hangs or something unexplainable happens, and I'll want to RDP to the node that ran the test to see what's what.
It would be nice if I could embed, either in the test log or programmatically via Python, the machine name or IP of the Webdriver node that the hub selected to test the execution. I know that this Python code returns a machine name for Windows:
import socket
nodeName=socket.gethostname()
But of course when you execute that in the test script it returns the name of the server running the script, not the name of the node running the test session.
Anyone know how I can do this?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…