Extends Nightmare with .rightClick(), .middleClick(), .ctrlClick() and other actions.
- Install by executing
npm install nightmare-advanced-clickoryarn add nightmare-advanced-click. - Import by adding
require('nightmare-advanced-click'). - Use by adding e.g.
.middleClick(selector)to your Nightmare chain.
Add nigthmare-wait-for-url by executing npm install nightmare-advanced-click or yarn add nightmare-advanced-click.
Here's an example of basic usage:
const Nightmare = require('nightmare'); require('nightmare-advanced-click'); const nightmare = Nightmare({ show: true }) nightmare .goto('https://duckduckgo.com/') .type('#search_form_input_homepage', 'Alexander the great') .ctrlClick('#search_button_homepage');Clicks a given element with a middle button.
Clicks a given element with a right button.
Clicks a given element with a left button while holding Ctrl key.
Clicks a given element with a left button while holding Alt key.
Clicks a given element with a left button while holding ⇧ Shift key.
Clicks a given element with a left button while holding ⌘ Command key.
The MIT License.
| Wojciech Maj kontakt@wojtekmaj.pl https://wojtekmaj.pl |
