Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

wojtekmaj/nightmare-advanced-click

Repository files navigation

npm downloads CI 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

Wojciech Maj
[email protected]
https://wojtekmaj.pl

About

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

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published