1.0.1 • Published 6 years ago

nightmare-advanced-click v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

downloads build dependencies dev dependencies

nightmare-advanced-click

Extends Nightmare with .rightClick(), .middleClick(), .ctrlClick() and other actions.

tl;dr

  • Install by executing npm install nightmare-advanced-click or yarn 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 = 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');

.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