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

爷,独闯天下 提交于 2019-11-27 16:22:37

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!