Zahidul Islam
Zahidul Islam

Reputation: 99

NightwatchJS setup on local selenium grid

I was not able to find a tutorial that uses nightwatch js and local selenium grid (stuck on how to update the nightwatch.conf.js file correctly). I want to run a nightwatch test using selenium grid but was not successful.

I followed this guide = https://www.guru99.com/introduction-to-selenium-grid.html (but I used nightwatch and not java)

Here is my setup (Machine A is on Virtual Box, I can ping vise-versa Windows 10 host):

enter image description here

So only thing left to do is update the "nightwatch.conf.js" file and run the test

Here is what I updated:

enter image description here

This is the error that I get:

enter image description here

Upvotes: 0

Views: 453

Answers (1)

Raju
Raju

Reputation: 2509

This will work only when the selenium server is running in your machine. Grid is a setup where the server is running in a different machine. Below settings should work for you.

Replace webdriver: {}, with below code and selenium_host & selenium_port from your current config.

selenium: {
  host: 192.168.56.102
  port: 4444
}

Please refer to WebDriver Settings section of official docs here.

Upvotes: 1

Related Questions