nightmare-advanced-click
Extends Nightmare with .rightClick(), .middleClick(), .ctrlClick() and other actions.
tl;dr
- Install by executing
npm install nightmare-advanced-click
oryarn add nightmare-advanced-click
. - Import by adding
require('nightmare-advanced-click')
. - Use by adding e.g.
.middleClick(selector)
to your Nightmare chain.
Getting started
Installation
Add nigthmare-wait-for-url by executing npm install nightmare-advanced-click
or yarn add nightmare-advanced-click
.
Usage
Here's an example of basic usage:
const Nightmare = ;; const nightmare = nightmare type'#search_form_input_homepage' 'Alexander the great' ;
.middleClick(string)
Clicks a given element with a middle button.
.rightClick(string)
Clicks a given element with a right button.
.ctrlClick(string)
Clicks a given element with a left button while holding Ctrl key.
.altClick(string)
Clicks a given element with a left button while holding Alt key.
.shiftClick(string)
Clicks a given element with a left button while holding ⇧ Shift key.
.cmdClick(string)
Clicks a given element with a left button while holding ⌘ Command key.
License
The MIT License.
Author
![]() |
Wojciech Maj kontakt@wojtekmaj.pl http://wojtekmaj.pl |