2018-12-06 20:05:58 +00:00
< img src = "https://user-images.githubusercontent.com/39191/49555713-a07b3c00-f8b5-11e8-8aba-f2d03cd83da5.png" height = "200" align = "right" >
2018-12-06 19:48:06 +00:00
# Puppeteer for Firefox
2018-12-06 19:24:00 +00:00
2018-12-06 19:48:06 +00:00
> Use Puppeteer's API with Firefox
2018-12-06 19:24:00 +00:00
2019-02-06 18:06:36 +00:00
> **BEWARE**: This project is experimental. 🐊 live here. [Is Puppeteer-Firefox Ready?](https://aslushnikov.github.io/ispuppeteerfirefoxready/)
2018-12-06 19:24:00 +00:00
## Getting Started
### Installation
2018-12-06 19:48:06 +00:00
To use Puppeteer with Firefox in your project, run:
2018-12-06 19:24:00 +00:00
```bash
npm i puppeteer-firefox
# or "yarn add puppeteer-firefox"
```
2019-02-08 21:28:43 +00:00
Note: When you install puppeteer-firefox, it downloads a [custom-built Firefox ](https://github.com/puppeteer/juggler ) (Firefox/63.0.4) that is guaranteed to work with the API.
2018-12-06 19:24:00 +00:00
### Usage
**Example** - navigating to https://example.com and saving a screenshot as *example.png* :
Save file as **example.js**
```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
```bash
node example.js
```
### API Status
2019-02-08 21:28:43 +00:00
Current tip-of-tree status of Puppeteer-Firefox is availabe at [isPuppeteerFirefoxReady? ](https://aslushnikov.github.io/ispuppeteerfirefoxready/ )
2018-12-06 19:24:00 +00:00
2019-02-08 21:28:43 +00:00
### Credits
2018-12-06 20:05:58 +00:00
Special thanks to [Amine Bouhlali ](https://bitbucket.org/aminerop/ ) who volunteered the [`puppeteer-firefox` ](https://www.npmjs.com/package/puppeteer-firefox ) NPM package.