81d2600236
This corresponds to Chromium 79.0.3942.0. This roll includes: - Support CSS media feature emulation in CDP https://chromium-review.googlesource.com/c/chromium/src/+/1821608 - Implement timezone ID verification https://chromium-review.googlesource.com/c/chromium/src/+/1822557 - Allow aria-hidden objects into the browser-side ax tree https://chromium-review.googlesource.com/c/chromium/src/+/1760862 - Remove pre-BlinkGenPropertyTrees codepaths (affects screenshot clipping) https://chromium-review.googlesource.com/c/chromium/src/+/1752244 - Terminate some asynchronous waiting commands on cross-process navigation https://chromium-review.googlesource.com/c/chromium/src/+/1766001/21#message-a6a61261b97ffca6ecb180c0a2303b538f7a6476 Per upstream Chromium changes, `page.screenshot` now clips elements to the viewport. This matches the clipping behavior of elements in inner scrollers (i.e., document and overflow scroll clipping now work the same). |
||
---|---|---|
.. | ||
.ci | ||
examples | ||
lib | ||
misc | ||
.cirrus.yml | ||
.gitignore | ||
.npmignore | ||
DeviceDescriptors.js | ||
Errors.js | ||
index.js | ||
install.js | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json |
Prototype: Puppeteer for Firefox
Use Puppeteer's API with Firefox
⚠️ BEWARE: Experimental. Just for preview. Installation and usage will change.
This project is a 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
API Status
Current tip-of-tree status of Puppeteer-Firefox is available at isPuppeteerFirefoxReady?
Credits
Special thanks to Amine Bouhlali who volunteered the puppeteer-firefox
NPM package.