NightwatchJS tests with javascript disabled
RunSample project for this S.O answer.
Install
Clone/Install
$ git clone https://github.com/nicholaswmin/nightwatch-js-disabled
$ cd nightwatch-js-disabled
$ npm install
Install NightwatchJS
$ npm install -g nightwatch
Run selenium server
$ java -jar selenium/selenium-server-standalone-3.9.1.jar
Run the tests
$ nightwatch test.js
The above will run the test file, test.js
which basically visits
https://stackoverflow.com with JS disabled and verifies that it shows
the "JavaScript Disabled" warning.
The configuration that hints to WebDriver that it should start Chromium
with JS disabled is in nightwatch.json
in the root directory.
The tests only run on Chrome, but you can add other browsers/configuration if you want to by visiting NightwatchJS Getting Started.
License
MIT