0.0.4 • Published 7 years ago

nightmare-xpath-event v0.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Nightmare Xpath Event

Nightmare plugin support click/touch events by using xpath expressions.

Features

Install

npm install nightmare-xpath-event

Usage

import Nightmare from 'nightmare'
import { touch, clickByXpath } from 'nightmare-xpath-event'

Nightmare.action('touch', touch)
Nightmare.action('clickByXpath', clickByXpath)

const nightmare = new Nightmare()

nightmare
  .goto('https://example.com/')
  .touch('//*[@id="root"]')
  .clickByXpath('//*[@id="root"]')