https://github.com/maxgalbu/nightwatch-custom-commands-assertions
Nightwatch.js custom commands and assertions
https://github.com/maxgalbu/nightwatch-custom-commands-assertions
assertions babel gulp javascript markdox nightwatchjs selenium
Last synced: about 1 month ago
JSON representation
Nightwatch.js custom commands and assertions
- Host: GitHub
- URL: https://github.com/maxgalbu/nightwatch-custom-commands-assertions
- Owner: maxgalbu
- License: mit
- Created: 2014-12-04T15:59:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T04:37:59.000Z (over 2 years ago)
- Last Synced: 2024-04-02T16:21:54.563Z (about 1 year ago)
- Topics: assertions, babel, gulp, javascript, markdox, nightwatchjs, selenium
- Language: JavaScript
- Size: 50.8 MB
- Stars: 136
- Watchers: 14
- Forks: 34
- Open Issues: 15
-
Metadata Files:
- Readme: Readme.md
- Contributing: Contributing.md
- License: LICENSE
Awesome Lists containing this project
README
## Nightwatch custom commands and assertions
[](https://travis-ci.org/maxgalbu/nightwatch-custom-commands-assertions) [](http://badge.fury.io/js/nightwatch-custom-commands-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](http://nightwatchjs.org/guide#settings-file)) and edit the `custom_commands_path` and `custom_assertions_path` keys so they look like this:
```json
{
... //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`.
### Alternative ways of installing
- Go into your `tests` folder (or where your nightwatch.json is) and do:
```
git clone https://github.com/maxgalbu/nightwatch-custom-commands-assertions.git
```- Download the zipped repository [here](https://github.com/maxgalbu/nightwatch-custom-commands-assertions/archive/master.zip) and extract it wherever you want
You then need to open your nightwatch.json and edit `custom_commands_path` and `custom_assertions_path` according to where you cloned or extracted the repository.
### Contributing
See [Contributing.md](https://github.com/maxgalbu/nightwatch-custom-commands-assertions/blob/master/Contributing.md).
### List of commands
See [the docs folder](https://github.com/maxgalbu/nightwatch-custom-commands-assertions/blob/master/docs)