Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g-plane/rize
High-level, fluent and chainable API provided library for puppeteer.
https://github.com/g-plane/rize
chainable-interface chainable-methods chrome fluent-api googlechrome puppeteer rize
Last synced: 26 days ago
JSON representation
High-level, fluent and chainable API provided library for puppeteer.
- Host: GitHub
- URL: https://github.com/g-plane/rize
- Owner: g-plane
- License: mit
- Created: 2018-02-19T01:43:03.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-22T03:13:14.000Z (over 4 years ago)
- Last Synced: 2024-11-09T17:51:39.812Z (about 1 month ago)
- Topics: chainable-interface, chainable-methods, chrome, fluent-api, googlechrome, puppeteer, rize
- Language: TypeScript
- Homepage: https://rize.js.org/
- Size: 3.05 MB
- Stars: 176
- Watchers: 6
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-puppeteer - rize
- awesome-puppeteer - rize - High-level, fluent and chainable API provided library for puppeteer. (Testing)
- awesome-puppeteer-zh - rize - 为Puppeteer操作者提供高级,流畅和可链接的API库. (测试 / 贡献)
README
Rize
Rize is a high-level, fluent and chainable API provided library which let you use puppeteer simply.
"Rize" is pronounced like /ɾize/, not /raɪzɪ/. "Rize" is one of characters in [*Is the Order a Rabbit?*](https://en.wikipedia.org/wiki/Is_the_Order_a_Rabbit%3F).
### Translations
[简体中文](https://rize.js.org/zh-CN/)
We need your help to translate the docs!
## Installation
You should install `puppeteer` at the same time.
```bash
yarn add --dev puppeteer rize
```or via npm:
```bash
npm install --save-dev puppeteer rize
```If you are in China, you may specify Chromium binary mirror.
On Linux or macOS:
```bash
PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors yarn add --dev puppeteer rize
```On Windows:
```shell
SET PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors yarn add --dev puppeteer rize
```## Basic Usage
### Import
It's recommended to use ES-style import:
```javascript
import Rize from 'rize'
```Or using CommonJS-style import, if you don't use any build tools:
```javascript
const Rize = require('rize')
```### Getting Started
Just like this:
```javascript
const rize = new Rize()
```You can pass some options to the constructor,
and these options are `puppeteer`'s options:```javascript
const rize = new Rize({ headless: false })
```All `Rize`'s APIs are chainable, so you can do something like this:
```javascript
const rize = new Rize()
rize
.goto('https://github.com/')
.type('input.header-search-input', 'node')
.press('Enter')
.waitForNavigation()
.assertSee('Node.js')
.end() // Don't forget to call `end` function to exit browser!
```All available APIs are listed [here](https://rize.js.org/api/classes/_index_.rize.html).
## Documentation
Please visit [rize.js.org](https://rize.js.org)
## Contribution
Before you contribute to Rize, please read [Contributing Guide](./.github/CONTRIBUTING.md).
## License
MIT License
Copyright (c) 2018-present Pig Fang