docs: better describe how to install Firefox Nightly with Puppeteer (#6226)

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
This commit is contained in:
Christian Bromann 2020-07-16 14:28:09 +02:00 committed by GitHub
parent f1a6b8d66d
commit 82645e85c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -593,7 +593,7 @@ const browser = await puppeteer.launch({
#### puppeteer.product
- returns: <[string]> returns the name of the browser that is under automation (`"chrome"` or `"firefox"`)
The product is set by the `PUPPETEER_PRODUCT` environment variable or the `product` option in [puppeteer.launch([options])](#puppeteerlaunchoptions) and defaults to `chrome`. Firefox support is experimental.
The product is set by the `PUPPETEER_PRODUCT` environment variable or the `product` option in [puppeteer.launch([options])](#puppeteerlaunchoptions) and defaults to `chrome`. Firefox support is experimental and requires to install Puppeteer via `PUPPETEER_PRODUCT=firefox npm i puppeteer`.
### class: BrowserFetcher

View File

@ -771,7 +771,7 @@ function resolveExecutablePath(
}
const revisionInfo = browserFetcher.revisionInfo(launcher._preferredRevision);
const missingText = !revisionInfo.local
? `Could not find browser revision ${launcher._preferredRevision}. Run "npm install" or "yarn install" to download a browser binary.`
? `Could not find browser revision ${launcher._preferredRevision}. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.`
: null;
return { executablePath: revisionInfo.executablePath, missingText };
}