Nightwatch.js custom commands and assertions
These are some commands and assertion I use when I'm testing with nightwatch.js and selenium.
You can install it using npm:
npm install nightwatch-custom-commands-assertions --save-dev
Then, open the nightwatch.json file in your editor (or create it if it doesn't exist) and edit the
custom_commands_pathand
custom_assertions_pathkeys so they look like this:
{ ... //your config"custom_commands_path" : "node_modules/nightwatch-custom-commands-assertions/js/commands", "custom_assertions_path" : "node_modules/nightwatch-custom-commands-assertions/js/assertions", ... //your config again
}
Now you should be able to use these commands/assertions when you call
nightwatch --test.
testsfolder (or where your nightwatch.json is) and do:
git clone https://github.com/maxgalbu/nightwatch-custom-commands-assertions.git
You then need to open your nightwatch.json and edit
custom_commands_pathand
custom_assertions_pathaccording to where you cloned or extracted the repository.
See Contributing.md.
See the docs folder