Package Exports
- bubanai
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bubanai) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Bubanai - Puppeteer wrapper library (under construction)
Bubanai - in Hebrew, it's a person that builds the puppets and operates them
A testing library to simplify the usage of raw Puppeteer methods
Getting started
To use Bubanai in your project, run command using yarn:
yarn add --dev bubanaiOr npm
npm install --save-dev bubanaiUsage/Example
const { click, getText } = require('bubanai');
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com/');
await click(page, 'a');
const mainText = await getText(page, 'h1');
expect(mainText).toContain('IANA');
await browser.close();
})();
Development
Clone the repository and navigate to the project folder
git clone git@github.com:wix-incubator/bubanai.git
cd bubanaiInstall the required dependencies
yarn installRunning Tests
To run tests, run the following command:
yarn testAPI Reference
Explore the API on the GitHub pages
Documentation
Bubanai documentation is available at https://wix-incubator.github.io/bubanai.
It's generated automatically on updating the main branch.
Building documentation locally
To build the documentation locally, you need to execute the following command in the project's root directory:
yarn generate-apiHTML Documentation will be generated in the docs folder