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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.10.2
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.10.2
    6
  • 2.10.1
    0
  • 2.10.0
    0

Package Sidebar

Install

npm i node-nightmare

Weekly Downloads

6

Version

2.10.2

License

MIT

Last publish

Collaborators

  • lwdgit