🤖 I have created a release *beep* *boop* --- ## [18.1.0](https://github.com/puppeteer/puppeteer/compare/v18.0.5...v18.1.0) (2022-10-05) ### Features * **chromium:** roll to Chromium 107.0.5296.0 (r1045629) ([#9039](https://github.com/puppeteer/puppeteer/issues/9039)) ([022fbde
](022fbde85e
)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2.8 KiB
sidebar_label |
---|
BrowserFetcher |
BrowserFetcher class
BrowserFetcher can download and manage different versions of Chromium and Firefox.
Signature:
export declare class BrowserFetcher
Remarks
BrowserFetcher operates on revision strings that specify a precise version of Chromium, e.g. "533271"
. Revision strings can be obtained from omahaproxy.appspot.com. In the Firefox case, BrowserFetcher downloads Firefox Nightly and operates on version numbers such as "75"
.
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the BrowserFetcher
class.
Example
An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it:
const browserFetcher = puppeteer.createBrowserFetcher();
const revisionInfo = await browserFetcher.download('533271');
const browser = await puppeteer.launch({
executablePath: revisionInfo.executablePath,
});
NOTE BrowserFetcher is not designed to work concurrently with other instances of BrowserFetcher that share the same downloads directory.
Methods
Method | Modifiers | Description |
---|---|---|
canDownload(revision) | Initiates a HEAD request to check if the revision is available. | |
download(revision, progressCallback) | Initiates a GET request to download the revision from the host. | |
host() | ||
localRevisions() | ||
platform() | ||
product() | ||
remove(revision) | ||
revisionInfo(revision) |