puppeteer/experimental/puppeteer-firefox
2019-02-15 23:34:01 -08:00
..
.ci feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
examples feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
lib fix(firefox): properly cleanup networkmanager (#4024) 2019-02-15 23:34:01 -08:00
misc feat(firefox): support running beforeunload hooks when closing (#4003) 2019-02-13 22:16:12 -08:00
test test(firefox): further unify Puppeteer-Firefox and Puppeteer tests (#3894) 2019-02-02 18:49:12 -07:00
.cirrus.yml feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
.gitignore feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
.npmignore feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
completeness.sh feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
Errors.js feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
index.js feat(firefox): introduce async stacks for Puppeteer-Firefox (#3948) 2019-02-07 15:18:43 -08:00
install.js chore(juggler): Roll Firefox to 120450a2 (#3842) 2019-01-25 15:25:54 -05:00
LICENSE feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
package.json fix(firefox): add test to make sure remote browser can be closed (#4023) 2019-02-15 18:26:14 -08:00
README.md chore: remove Juggler from Puppeteer repository (#3954) 2019-02-08 13:28:43 -08:00
tsconfig.json feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00

Puppeteer for Firefox

Use Puppeteer's API with Firefox

BEWARE: This project is experimental. 🐊 live here. Is Puppeteer-Firefox Ready?

Getting Started

Installation

To use Puppeteer with Firefox in your project, run:

npm i puppeteer-firefox
# or "yarn add puppeteer-firefox"

Note: When you install puppeteer-firefox, it downloads a custom-built Firefox (Firefox/63.0.4) that is guaranteed to work with the API.

Usage

Example - navigating to https://example.com and saving a screenshot as example.png:

Save file as example.js

const pptrFirefox = require('puppeteer-firefox');

(async () => {
  const browser = await pptrFirefox.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({path: 'example.png'});
  await browser.close();
})();

Execute script on the command line

node example.js

API Status

Current tip-of-tree status of Puppeteer-Firefox is availabe at isPuppeteerFirefoxReady?

Credits

Special thanks to Amine Bouhlali who volunteered the puppeteer-firefox NPM package.