For my test, I am running grid and node locally on different ports.
java -jar /usr/bin/selenium-server.jar -port 4444 -role hub
java -jar /usr/bin/selenium-server.jar -role node -hub http://127.0.0.1:4444/grid/register -port 5556
So, the grid is running on 4444 and node is running on 5556.
In my test, if i start the driver as
driver = webdriver.Remote(command_executor='http://127.0.0.1:4444/wd/hub', desired_capabilities=desired_capabilities)
then the test fails with the exception
response = {'status': 500, 'value': '{"status":13,"value":{"class":"java.lang.NullPointerException","stackTrace":[{"fileName":"Ha...n","lineNumber":590},{"fileName":"Thread.java","className":"java.lang.Thread","methodName":"run","lineNumber":745}]}}'}
The test passed if i run the test on the node port 5555, instead of the hub port 4444, as shown below
driver = webdriver.Remote(command_executor='http://127.0.0.1:5555/wd/hub', desired_capabilities=desired_capabilities)
I was of the opinion that, we should be running the tests on the hub port, which in this case is 4444 and not 5555.
Please correct me if i am wrong.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…