Puppeteer browser
Multiple Web browser controller based on Puppeteer API, wraps puppeteer
, puppeteer-fx
& puppeteer-ie
in one package.
Use as a Test runner
Create your_script.js
import PuppeteerBrowser from 'puppeteer-browser';
(async () => {
const page = await PuppeteerBrowser.getPage(
'path/to/start/server', 'path/to/open/page'
);
console.log(await page.title());
})();
then run one command below in your terminal
# Chrome
node your_script
# Firefox
npm set PUPPETEER_BROWSER firefox && node your_script
# Internet Explorer
npm set PUPPETEER_BROWSER IE && node your_script
[ Notice ] Option started with --inspect
in the command-line will disable Headless mode.
Use as a developing viewer
directories.lib
field of package.json
or process.cwd()
will be watched.
API Document
Online: URL or
npm docs
Offline:
npm start