mimmus
mimmus

Reputation: 21

Running Nightwatch without Selenium Server in a Docker container

I read that:

Starting with Nightwatch 1.0, using Selenium Standalone Server is no longer required, nor is it recommended for testing against a single browser...

But I'm unable to find any documentation about interacting directly with the WebDriver and especially to run Nightwatch+Chromedriver in a Docker container.

Any specific help?

Upvotes: 2

Views: 2117

Answers (2)

Sj Pietel
Sj Pietel

Reputation: 1

Nightwatch is capable of autostarting webdriver process, connect to its port and directly communicate to it:

  "webdriver" : {
  "port": 9515,
  "start_process": true,
  "server_path": "./node_modules/chromedriver/bin/chromedriver",
  "cli_args": []
}

As an option you can start chromedriver and monitor the process through pm2

Upvotes: 0

Raju
Raju

Reputation: 2509

I haven't tried this myself but have found the below discussion and docs useful.

https://github.com/nightwatchjs/nightwatch/issues/1270

https://medium.com/@kenfehling/ui-testing-with-nightwatch-js-headless-chrome-and-docker-part-1-f0ce2e8a23a1

If you consider using selenium grid,

https://github.com/mycargus/nightwatch-docker-grid

Cheers!

Upvotes: 1

Related Questions