I use Nightwatch-Cucumber
based on Nightwatch.js
to automate my tests. And now I want to use Selenium Grid with a Selenium hub and several Selenium
This error message...
message: 'Connection refused!
...implies that the Selenium Grid Node was unable to initiate/spawn a new WebClient i.e. Web Browsing session.
Your main issue is in the command being used to start / initialize Selenium Grid Node. The Selenium Grid Node should be started with the desired WebDriver variant as an argument as follows :
Start the Selenium Grid Hub (default on port 4444
):
java -jar selenium-server-standalone-3.9.1.jar -role hub
Start the Selenium Grid Node (default on port 5555
):
java -Dwebdriver.chrome.driver=C:/path/to/chromedriver.exe -jar selenium-server-standalone-3.9.1.jar -role node -hub http://localhost:4444/grid/register
You can find a similar detailed discussion in Connection refused! Is selenium server started nightwatch on edge