node-nightmare

2.10.2 • Public • Published

Fork from nightmare

Features

  • support require nodejs modules ( use with to deal with conflicts perfectly)
  • default import jquery@3.1.1
  • add show & hide api

example

const Nightmare = require('node-nightmare')
Nightmare({show: false}) 
  .goto('https://google.com')
  .wait('body')
  .show()
  .insert('input[aria-label="Search"]', 'node-nightmare github.com')
  .click('input[type="submit"]')
  .wait(1000)
  .wait('body')
  .hide()
  .evaluate(function() {
      return $('a:contains("node-nightmare")').text();
      // default require saved in __NODE namespace, but you can use it directly in `evaluate` scope
  })
  .then(function(ret) {
     console.log(ret)
  })

default require saved in __NODE namespace, but you can use it directly in evaluate scope

Package Sidebar

Install

npm i node-nightmare

Weekly Downloads

1

Version

2.10.2

License

MIT

Last publish

Collaborators

  • lwdgit