Nightwatch custom commands and assertions
These are some commands and assertion I use when I'm testing with nightwatch.js and selenium.
How to use these things?
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_assertions_path keys so they look like this:
Now you should be able to use these commands/assertions when you call
Alternative ways of installing
Go into your
testsfolder (or where your nightwatch.json is) and do:
git clone https://github.com/maxgalbu/nightwatch-custom-commands-assertions.git
Download the zipped repository here and extract it wherever you want
You then need to open your nightwatch.json and edit
custom_assertions_path according to where you cloned or extracted the repository.
List of commands
See the docs folder