puppeteer/experimental/puppeteer-firefox
lcabral37 13ea347c7d
feat: support configuring the browser download path (#6014)
By adding support for an environment variable `PUPPETEER_DOWNLOAD_PATH` it is possible to support downloading the browser binaries into a folder outside the `node_modules` folder. This makes it possible to preserve previously downloaded binaries in order to skip downloading them again.
2020-08-10 10:37:31 +02:00
..
.ci/node10 chore: drop Node.js v8 support (#5365) 2020-03-10 21:55:32 +01:00
examples feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
lib feat: support configuring the browser download path (#6014) 2020-08-10 10:37:31 +02:00
misc chore: drop Node.js v6 support (#5045) 2019-10-16 17:00:20 +02:00
.cirrus.yml chore: drop Node.js v8 support (#5365) 2020-03-10 21:55:32 +01: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
DeviceDescriptors.js chore: drop Node.js v6 support (#5045) 2019-10-16 17:00:20 +02: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 feat: support configuring the browser download path (#6014) 2020-08-10 10:37:31 +02:00
LICENSE feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00
package.json chore: update references to branch names (#6022) 2020-06-15 17:34:16 +02:00
README.md docs(puppeteer-firefox): add deprecation warning to README (#5502) 2020-04-03 13:23:30 +02:00
tsconfig.json feat: introduce puppeteer-firefox (#3628) 2018-12-06 11:24:00 -08:00

Prototype: Puppeteer for Firefox

⚠️ The puppeteer-firefox package has been deprecated: Firefox support is gradually transitioning to the puppeteer package. As of puppeteer v2.1.0 you can interact with Firefox Nightly. The puppeteer-firefox package will remain available until the transition is complete, but it is no longer actively maintained. For more information visit https://wiki.mozilla.org/Remote

This project is an experimental feasibility prototype to guide the work of implementing Puppeteer endpoints into Firefox's code base. Mozilla's bug 1545057 tracks the initial milestone, which will be based on a CDP-based remote protocol.

Getting Started

Installation

To try out 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

Credits

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