'Connection refused! Is selenium server started?\n' while running Nightwatch.js tests against Selenium Grid

前端 未结 1 1138
广开言路
广开言路 2020-12-04 03:05

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

相关标签:
1条回答
  • 2020-12-04 03:30

    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 :

    1. Start the Selenium Grid Hub (default on port 4444):

      java -jar selenium-server-standalone-3.9.1.jar -role hub
      
    2. 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

    0 讨论(0)
提交回复
热议问题