https://github.com/we-tool/nixe
Another high-level browser automation library.
https://github.com/we-tool/nixe
automation electron nightmare test
Last synced: about 2 months ago
JSON representation
Another high-level browser automation library.
- Host: GitHub
- URL: https://github.com/we-tool/nixe
- Owner: we-tool
- Created: 2016-02-20T16:53:42.000Z (over 10 years ago)
- Default Branch: dev
- Last Pushed: 2017-03-14T08:42:45.000Z (over 9 years ago)
- Last Synced: 2025-03-27T19:51:24.385Z (about 1 year ago)
- Topics: automation, electron, nightmare, test
- Language: JavaScript
- Size: 29.3 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nixe
Another high-level browser automation library.
Heavily inspired by [nightmare][1]
## Compared to Nightmare
- [x] ES2015+ Build System
- [x] Async/Await Style
- [x] Simpler Codebase
- [ ] Seamless Access to Electron Objects
## Usage
```plain
$ cd my/project
$ npm install -S electron-prebuilt
$ npm install nixe
```
```js
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
```plain
$ npm install -g webpack mocha
$ cd nixe
$ npm install
$ npm run dev
$ npm test
```
## Chinese Mirror for Electron
```plain
ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/
```
[1]: https://github.com/segmentio/nightmare