docs: better describe how to install Firefox Nightly with Puppeteer (#6226)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
This commit is contained in:
parent
f1a6b8d66d
commit
82645e85c7
@ -593,7 +593,7 @@ const browser = await puppeteer.launch({
|
|||||||
#### puppeteer.product
|
#### puppeteer.product
|
||||||
- returns: <[string]> returns the name of the browser that is under automation (`"chrome"` or `"firefox"`)
|
- 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
|
### class: BrowserFetcher
|
||||||
|
@ -771,7 +771,7 @@ function resolveExecutablePath(
|
|||||||
}
|
}
|
||||||
const revisionInfo = browserFetcher.revisionInfo(launcher._preferredRevision);
|
const revisionInfo = browserFetcher.revisionInfo(launcher._preferredRevision);
|
||||||
const missingText = !revisionInfo.local
|
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;
|
: null;
|
||||||
return { executablePath: revisionInfo.executablePath, missingText };
|
return { executablePath: revisionInfo.executablePath, missingText };
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user