This project contains supplementary examples and documentation for Nightmare JS.
New to Nightmare? The most basic way to use it is with promises or callbacks. Here are a few examples:
Several JavaScript libraries use generators to give you a simpler way to deal with asynchronous events. Here’s how to use Nightmare with some of them:
Nightmare may not do everything out of the box that you need it to do.
.action()- Look here if adding a method that does a specific activity in the browser..use()- Wrap several actions up for reusability in one tidy place.
Working with an automated web browser can be complex. Here are a few common gotchas and issues you might run into while working with Nightmare:
Here are some known problems with Nightmare:
All pages above have accompanying scripts you can actually run. To get started, you’ll need to make sure you install their dependencies first by running npm install.
After that, all the examples are runnable using node [example].
If something has been missed, needs correcting, or you have a question, feel free to open an issue or pull request.