Skip to content
/ nixe Public

Another high-level browser automation library.

Notifications You must be signed in to change notification settings

we-tool/nixe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nixe

  

Another high-level browser automation library.

Heavily inspired by nightmare

Compared to Nightmare

  • ES2015+ Build System
  • Async/Await Style
  • Simpler Codebase
  • Seamless Access to Electron Objects

Usage

$ cd my/project
$ npm install -S electron-prebuilt
$ npm install nixe
import Nixe from 'nixe'

new Nixe().ready()
  .goto('https://www.baidu.com/')
  .execute('alert(123)')
  .queue(async () => 333)
  .run()

// `run` is optional with await/then style
new Nixe().ready()
  .goto('https://www.baidu.com/')
  .evaluate(() => document.title)
  .then((title) => {})

// or async/await style
;(async () => {
  const title = await new Nixe().ready()
    .goto('https://www.baidu.com/')
    .evaluate(() => document.title)
})()

Dev & Test

$ npm install -g webpack mocha
$ cd nixe
$ npm install
$ npm run dev
$ npm test

Chinese Mirror for Electron

ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/

Releases

No releases published

Packages

No packages published