
Special thanks to Amine Bouhlali who volunteered the puppeteer-firefox NPM package. Save file as example.js const pptrFirefox = require( 'puppeteer-firefox') Ĭonst browser = await pptrFirefox.launch() Īwait page.screenshot() Įxecute script on the command line node example.jsĬurrent tip-of-tree status of Puppeteer-Firefox is available at isPuppeteerFirefoxReady? Credits Step 1 We have to first install Puppeteer for the Firefox browser by executing the below command npm install puppeteer-firefox Also, we have to add the Firefox-Puppeteer library in the code. UsageĮxample - navigating to and saving a screenshot as example.png: Puppeteer version: 3.2.0 Platform / OS version: Windows 10 URLs (if applicable): Node.js version: v13.8.0 NPM version: 6.14.2 I was using Firefox Developers instead of Firefox Nightly, which seems to be an issue. Note: When you install puppeteer-firefox, it downloads a custom-built Firefox (Firefox/63.0.4) that is guaranteed to work with the API. To try out Puppeteer with Firefox in your project, run: npm i puppeteer-firefox Mozilla's bug 1545057 tracks the initial milestone, which will be based on a CDP-based remote protocol. browser - can be changed to firefox when using puppeteer-firefox (opens new window). Puppeteer is headless by default, making it fast to run. It requires zero setup and comes bundled with the Chromium version most suited to it. This project is a feasibility prototype to guide the work of implementing Puppeteer endpoints into Firefox's code base. The most extensive knowledge-base for testing community, for free. Puppeteer is a headless Node library that provides a high level API for controlling Chromium or Chrome over the DevTools protocol.
