fix: update documentation on configuring puppeteer (#9150)

This PR updates the docs regarding configuring puppeteer. In addition,
some changes have been made to the documentation generator to show
default values on the documentation site.

Also fixes: https://github.com/puppeteer/puppeteer/pull/9144
This commit is contained in:
jrandolf 2022-10-24 09:07:05 +02:00 committed by GitHub
parent 4bf338b26d
commit f07ad2c661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
734 changed files with 2204 additions and 1605 deletions

View File

@ -5,7 +5,7 @@
<img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" height="200" align="right"/> <img src="https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png" height="200" align="right"/>
#### [API](https://pptr.dev/api) | [FAQ](https://pptr.dev/faq) | [Contributing](https://pptr.dev/contributing) | [Troubleshooting](https://pptr.dev/troubleshooting) #### [Guides](https://pptr.dev/guides) | [API](https://pptr.dev/api) | [FAQ](https://pptr.dev/faq) | [Contributing](https://pptr.dev/contributing) | [Troubleshooting](https://pptr.dev/troubleshooting)
> Puppeteer is a Node.js library which provides a high-level API to control > Puppeteer is a Node.js library which provides a high-level API to control
> Chrome/Chromium over the > Chrome/Chromium over the
@ -49,51 +49,32 @@ Chromium (~170MB macOS, ~282MB Linux, ~280MB Windows) that is
with Puppeteer. For a version of Puppeteer without installation, see with Puppeteer. For a version of Puppeteer without installation, see
[`puppeteer-core`](#puppeteer-core). [`puppeteer-core`](#puppeteer-core).
#### Environment Variables #### Configuring Puppeteer
Puppeteer looks for certain Puppeteer uses several defaults that can be customized through configuration
[environment variables](https://en.wikipedia.org/wiki/Environment_variable) for files.
customizing behavior. If Puppeteer doesn't find them in the environment during
the installation step, a lowercased variant of these variables will be used from
the [npm config](https://docs.npmjs.com/cli/config).
- `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` - defines HTTP proxy settings that are For example, to change the default cache directory Puppeteer uses to install
used to download and run the browser. browsers, you can add a `.puppeteerrc.cjs` (or `puppeteer.config.cjs`) at the
- `PUPPETEER_CACHE_DIR` - defines the directory to be used by Puppeteer for root of your application with the contents
caching. Defaults to
[`os.homedir()/.cache/puppeteer`](https://nodejs.org/api/os.html#os_os_homedir).
- `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` - do not download bundled Chromium during
installation step.
- `PUPPETEER_TMP_DIR` - defines the directory to be used by Puppeteer for
creating temporary files. Defaults to
[`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir).
- `PUPPETEER_DOWNLOAD_HOST` - specifies the URL prefix that is used to download
Chromium. Note: this includes protocol and might even include path prefix.
Defaults to `https://storage.googleapis.com`.
- `PUPPETEER_DOWNLOAD_PATH` - specifies the path for the downloads folder.
Defaults to `<cache>/chromium`, where `<cache>` is Puppeteer's cache
directory.
- `PUPPETEER_BROWSER_REVISION` - specifies a certain version of the browser
you'd like Puppeteer to use. See
[`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) on
how executable path is inferred.
- `PUPPETEER_EXECUTABLE_PATH` - specifies an executable path to be used in
[`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch).
- `PUPPETEER_PRODUCT` - specifies which browser you'd like Puppeteer to use.
Must be either `chrome` or `firefox`. This can also be used during
installation to fetch the recommended browser binary. Setting `product`
programmatically in
[`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch)
supersedes this environment variable.
- `PUPPETEER_EXPERIMENTAL_CHROMIUM_MAC_ARM` — specify Puppeteer download
Chromium for Apple M1. On Apple M1 devices Puppeteer by default downloads the
version for Intel's processor which runs via Rosetta. It works without any
problems, however, with this option, you should get more efficient resource
usage (CPU and RAM) that could lead to a faster execution time.
Environment variables except for `PUPPETEER_CACHE_DIR` are not used for ```js
[`puppeteer-core`](#puppeteer-core) since core does not automatically handle const {join} = require('path');
browser downloading.
/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};
```
After adding the configuration file, you will need to remove and reinstall
`puppeteer` for it to take effect.
See [Configuring
Puppeteer](https://pptr.dev/guides/configuring-puppeteer) for more information.
#### `puppeteer-core` #### `puppeteer-core`
@ -104,21 +85,21 @@ Every release since v1.7.0 we publish two packages:
`puppeteer` is a _product_ for browser automation. When installed, it downloads `puppeteer` is a _product_ for browser automation. When installed, it downloads
a version of Chromium, which it then drives using `puppeteer-core`. Being an a version of Chromium, which it then drives using `puppeteer-core`. Being an
end-user product, `puppeteer` supports a bunch of convenient `PUPPETEER_*` env end-user product, `puppeteer` automates several workflows using reasonable defaults [that can be customized](https://pptr.dev/guides/configuring-puppeteer).
variables to tweak its behavior.
`puppeteer-core` is a _library_ to help drive anything that supports DevTools `puppeteer-core` is a _library_ to help drive anything that supports DevTools
protocol. `puppeteer-core` doesn't download Chromium when installed. Being a protocol. Being a library, `puppeteer-core` is fully driven through its
library, `puppeteer-core` is fully driven through its programmatic interface. programmatic interface implying no defaults are assumed and `puppeteer-core`
will not download Chromium when installed.
You should only use `puppeteer-core` if you are You should use `puppeteer-core` if you are [connecting to a remote
[connecting to a remote browser](https://pptr.dev/api/puppeteer.puppeteer.connect) browser](https://pptr.dev/api/puppeteer.puppeteer.connect) or [managing browsers
or [managing browsers yourself](https://pptr.dev/api/puppeteer.browserfetcher). yourself](https://pptr.dev/api/puppeteer.browserfetcher). If you are managing
If you are managing browsers yourself, you will need to call browsers yourself, you will need to call
[`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) with [`puppeteer.launch`](https://pptr.dev/api/puppeteer.puppeteernode.launch) with
an explicit an an explicit
[`executablePath`](https://pptr.dev/api/puppeteer.launchoptions.executablepath) [`executablePath`](https://pptr.dev/api/puppeteer.launchoptions.executablepath)
or [`channel`](https://pptr.dev/api/puppeteer.launchoptions.channel). (or [`channel`](https://pptr.dev/api/puppeteer.launchoptions.channel) if it's installed in a standard location).
When using `puppeteer-core`, remember to change the import: When using `puppeteer-core`, remember to change the import:

View File

@ -73,7 +73,7 @@ sidebar_label: API
| [CDPSessionOnMessageObject](./puppeteer.cdpsessiononmessageobject.md) | | | [CDPSessionOnMessageObject](./puppeteer.cdpsessiononmessageobject.md) | |
| [ClickOptions](./puppeteer.clickoptions.md) | | | [ClickOptions](./puppeteer.clickoptions.md) | |
| [CommonEventEmitter](./puppeteer.commoneventemitter.md) | | | [CommonEventEmitter](./puppeteer.commoneventemitter.md) | |
| [Configuration](./puppeteer.configuration.md) | | | [Configuration](./puppeteer.configuration.md) | <p>Defines options to configure Puppeteer's behavior during installation and runtime.</p><p>See individual properties for more information.</p> |
| [ConnectionCallback](./puppeteer.connectioncallback.md) | | | [ConnectionCallback](./puppeteer.connectioncallback.md) | |
| [ConnectionTransport](./puppeteer.connectiontransport.md) | | | [ConnectionTransport](./puppeteer.connectiontransport.md) | |
| [ConnectOptions](./puppeteer.connectoptions.md) | | | [ConnectOptions](./puppeteer.connectoptions.md) | |
@ -84,6 +84,7 @@ sidebar_label: API
| [CSSCoverageOptions](./puppeteer.csscoverageoptions.md) | Set of configurable options for CSS coverage. | | [CSSCoverageOptions](./puppeteer.csscoverageoptions.md) | Set of configurable options for CSS coverage. |
| [CustomQueryHandler](./puppeteer.customqueryhandler.md) | | | [CustomQueryHandler](./puppeteer.customqueryhandler.md) | |
| [Device](./puppeteer.device.md) | | | [Device](./puppeteer.device.md) | |
| [ExperimentsConfiguration](./puppeteer.experimentsconfiguration.md) | <p>Defines experiment options for Puppeteer.</p><p>See individual properties for more information.</p> |
| [FrameAddScriptTagOptions](./puppeteer.frameaddscripttagoptions.md) | | | [FrameAddScriptTagOptions](./puppeteer.frameaddscripttagoptions.md) | |
| [FrameAddStyleTagOptions](./puppeteer.frameaddstyletagoptions.md) | | | [FrameAddStyleTagOptions](./puppeteer.frameaddstyletagoptions.md) | |
| [FrameWaitForFunctionOptions](./puppeteer.framewaitforfunctionoptions.md) | | | [FrameWaitForFunctionOptions](./puppeteer.framewaitforfunctionoptions.md) | |

View File

@ -6,7 +6,7 @@ sidebar_label: Accessibility
The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access). The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access).
**Signature:** #### Signature:
```typescript ```typescript
export declare class Accessibility export declare class Accessibility

View File

@ -6,7 +6,7 @@ sidebar_label: Accessibility.snapshot
Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page. Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page.
**Signature:** #### Signature:
```typescript ```typescript
class Accessibility { class Accessibility {

View File

@ -4,7 +4,7 @@ sidebar_label: ActionResult
# ActionResult type # ActionResult type
**Signature:** #### Signature:
```typescript ```typescript
export declare type ActionResult = 'continue' | 'abort' | 'respond'; export declare type ActionResult = 'continue' | 'abort' | 'respond';

View File

@ -4,7 +4,7 @@ sidebar_label: Awaitable
# Awaitable type # Awaitable type
**Signature:** #### Signature:
```typescript ```typescript
export declare type Awaitable<T> = T | PromiseLike<T>; export declare type Awaitable<T> = T | PromiseLike<T>;

View File

@ -6,7 +6,7 @@ sidebar_label: BoundingBox.height
the height of the element in pixels. the height of the element in pixels.
**Signature:** #### Signature:
```typescript ```typescript
interface BoundingBox { interface BoundingBox {

View File

@ -4,7 +4,7 @@ sidebar_label: BoundingBox
# BoundingBox interface # BoundingBox interface
**Signature:** #### Signature:
```typescript ```typescript
export interface BoundingBox extends Point export interface BoundingBox extends Point
@ -14,7 +14,7 @@ export interface BoundingBox extends Point
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| ------------------------------------------- | --------- | ------ | ------------------------------------ | | ------------------------------------------- | --------- | ------ | ------------------------------------ | ------- |
| [height](./puppeteer.boundingbox.height.md) | | number | the height of the element in pixels. | | [height](./puppeteer.boundingbox.height.md) | | number | the height of the element in pixels. | |
| [width](./puppeteer.boundingbox.width.md) | | number | the width of the element in pixels. | | [width](./puppeteer.boundingbox.width.md) | | number | the width of the element in pixels. | |

View File

@ -6,7 +6,7 @@ sidebar_label: BoundingBox.width
the width of the element in pixels. the width of the element in pixels.
**Signature:** #### Signature:
```typescript ```typescript
interface BoundingBox { interface BoundingBox {

View File

@ -4,7 +4,7 @@ sidebar_label: BoxModel.border
# BoxModel.border property # BoxModel.border property
**Signature:** #### Signature:
```typescript ```typescript
interface BoxModel { interface BoxModel {

View File

@ -4,7 +4,7 @@ sidebar_label: BoxModel.content
# BoxModel.content property # BoxModel.content property
**Signature:** #### Signature:
```typescript ```typescript
interface BoxModel { interface BoxModel {

View File

@ -4,7 +4,7 @@ sidebar_label: BoxModel.height
# BoxModel.height property # BoxModel.height property
**Signature:** #### Signature:
```typescript ```typescript
interface BoxModel { interface BoxModel {

View File

@ -4,7 +4,7 @@ sidebar_label: BoxModel.margin
# BoxModel.margin property # BoxModel.margin property
**Signature:** #### Signature:
```typescript ```typescript
interface BoxModel { interface BoxModel {

View File

@ -4,7 +4,7 @@ sidebar_label: BoxModel
# BoxModel interface # BoxModel interface
**Signature:** #### Signature:
```typescript ```typescript
export interface BoxModel export interface BoxModel
@ -12,11 +12,11 @@ export interface BoxModel
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| ------------------------------------------ | --------- | --------------------------------- | ----------- | | ------------------------------------------ | --------- | --------------------------------- | ----------- | ------- |
| [border](./puppeteer.boxmodel.border.md) | | [Point](./puppeteer.point.md)\[\] | | | [border](./puppeteer.boxmodel.border.md) | | [Point](./puppeteer.point.md)\[\] | | |
| [content](./puppeteer.boxmodel.content.md) | | [Point](./puppeteer.point.md)\[\] | | | [content](./puppeteer.boxmodel.content.md) | | [Point](./puppeteer.point.md)\[\] | | |
| [height](./puppeteer.boxmodel.height.md) | | number | | | [height](./puppeteer.boxmodel.height.md) | | number | | |
| [margin](./puppeteer.boxmodel.margin.md) | | [Point](./puppeteer.point.md)\[\] | | | [margin](./puppeteer.boxmodel.margin.md) | | [Point](./puppeteer.point.md)\[\] | | |
| [padding](./puppeteer.boxmodel.padding.md) | | [Point](./puppeteer.point.md)\[\] | | | [padding](./puppeteer.boxmodel.padding.md) | | [Point](./puppeteer.point.md)\[\] | | |
| [width](./puppeteer.boxmodel.width.md) | | number | | | [width](./puppeteer.boxmodel.width.md) | | number | | |

View File

@ -4,7 +4,7 @@ sidebar_label: BoxModel.padding
# BoxModel.padding property # BoxModel.padding property
**Signature:** #### Signature:
```typescript ```typescript
interface BoxModel { interface BoxModel {

View File

@ -4,7 +4,7 @@ sidebar_label: BoxModel.width
# BoxModel.width property # BoxModel.width property
**Signature:** #### Signature:
```typescript ```typescript
interface BoxModel { interface BoxModel {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.browserContexts
Returns an array of all open browser contexts. In a newly created browser, this will return a single instance of [BrowserContext](./puppeteer.browsercontext.md). Returns an array of all open browser contexts. In a newly created browser, this will return a single instance of [BrowserContext](./puppeteer.browsercontext.md).
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.close
Closes Chromium and all of its pages (if any were opened). The [Browser](./puppeteer.browser.md) object itself is considered to be disposed and cannot be used anymore. Closes Chromium and all of its pages (if any were opened). The [Browser](./puppeteer.browser.md) object itself is considered to be disposed and cannot be used anymore.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.createIncognitoBrowserContext
Creates a new incognito browser context. This won't share cookies/cache with other browser contexts. Creates a new incognito browser context. This won't share cookies/cache with other browser contexts.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.defaultBrowserContext
Returns the default browser context. The default browser context cannot be closed. Returns the default browser context. The default browser context cannot be closed.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.disconnect
Disconnects Puppeteer from the browser, but leaves the Chromium process running. After calling `disconnect`, the [Browser](./puppeteer.browser.md) object is considered disposed and cannot be used anymore. Disconnects Puppeteer from the browser, but leaves the Chromium process running. After calling `disconnect`, the [Browser](./puppeteer.browser.md) object is considered disposed and cannot be used anymore.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.isConnected
Indicates that the browser is connected. Indicates that the browser is connected.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser
A Browser is created when Puppeteer connects to a Chromium instance, either through [PuppeteerNode.launch()](./puppeteer.puppeteernode.launch.md) or [Puppeteer.connect()](./puppeteer.puppeteer.connect.md). A Browser is created when Puppeteer connects to a Chromium instance, either through [PuppeteerNode.launch()](./puppeteer.puppeteernode.launch.md) or [Puppeteer.connect()](./puppeteer.puppeteer.connect.md).
**Signature:** #### Signature:
```typescript ```typescript
export declare class Browser extends EventEmitter export declare class Browser extends EventEmitter

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.newPage
Promise which resolves to a new [Page](./puppeteer.page.md) object. The Page is created in a default browser context. Promise which resolves to a new [Page](./puppeteer.page.md) object. The Page is created in a default browser context.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.pages
An array of all open pages inside the Browser. An array of all open pages inside the Browser.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.process
The spawned browser process. Returns `null` if the browser instance was created with [Puppeteer.connect()](./puppeteer.puppeteer.connect.md). The spawned browser process. Returns `null` if the browser instance was created with [Puppeteer.connect()](./puppeteer.puppeteer.connect.md).
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.target
The target associated with the browser. The target associated with the browser.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.targets
All active targets inside the Browser. In case of multiple browser contexts, returns an array with all the targets in all browser contexts. All active targets inside the Browser. In case of multiple browser contexts, returns an array with all the targets in all browser contexts.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.userAgent
The browser's original user agent. Pages can override the browser user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md). The browser's original user agent. Pages can override the browser user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md).
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.version
A string representing the browser name and version. A string representing the browser name and version.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.waitForTarget
Searches for a target in all browser contexts. Searches for a target in all browser contexts.
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: Browser.wsEndpoint
The browser websocket endpoint which can be used as an argument to [Puppeteer.connect()](./puppeteer.puppeteer.connect.md). The browser websocket endpoint which can be used as an argument to [Puppeteer.connect()](./puppeteer.puppeteer.connect.md).
**Signature:** #### Signature:
```typescript ```typescript
class Browser { class Browser {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserConnectOptions.defaultViewport
Sets the viewport for each page. Sets the viewport for each page.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserConnectOptions { interface BrowserConnectOptions {

View File

@ -6,10 +6,14 @@ sidebar_label: BrowserConnectOptions.ignoreHTTPSErrors
Whether to ignore HTTPS errors during navigation. Whether to ignore HTTPS errors during navigation.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserConnectOptions { interface BrowserConnectOptions {
ignoreHTTPSErrors?: boolean; ignoreHTTPSErrors?: boolean;
} }
``` ```
#### Default value:
false

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserConnectOptions
Generic browser options that can be passed when launching any browser or when connecting to an existing browser instance. Generic browser options that can be passed when launching any browser or when connecting to an existing browser instance.
**Signature:** #### Signature:
```typescript ```typescript
export interface BrowserConnectOptions export interface BrowserConnectOptions
@ -14,9 +14,9 @@ export interface BrowserConnectOptions
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| ---------------------------------------------------------------------------- | --------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | ---------------------------------------------------------------------------- | --------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ------- |
| [defaultViewport?](./puppeteer.browserconnectoptions.defaultviewport.md) | | [Viewport](./puppeteer.viewport.md) \| null | <i>(Optional)</i> Sets the viewport for each page. | | [defaultViewport?](./puppeteer.browserconnectoptions.defaultviewport.md) | | [Viewport](./puppeteer.viewport.md) \| null | <i>(Optional)</i> Sets the viewport for each page. | |
| [ignoreHTTPSErrors?](./puppeteer.browserconnectoptions.ignorehttpserrors.md) | | boolean | <i>(Optional)</i> Whether to ignore HTTPS errors during navigation. | | [ignoreHTTPSErrors?](./puppeteer.browserconnectoptions.ignorehttpserrors.md) | | boolean | <i>(Optional)</i> Whether to ignore HTTPS errors during navigation. | false |
| [slowMo?](./puppeteer.browserconnectoptions.slowmo.md) | | number | <i>(Optional)</i> Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | | [slowMo?](./puppeteer.browserconnectoptions.slowmo.md) | | number | <i>(Optional)</i> Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | |
| [targetFilter?](./puppeteer.browserconnectoptions.targetfilter.md) | | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | <i>(Optional)</i> Callback to decide if Puppeteer should connect to a given target or not. | | [targetFilter?](./puppeteer.browserconnectoptions.targetfilter.md) | | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | <i>(Optional)</i> Callback to decide if Puppeteer should connect to a given target or not. | |

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserConnectOptions.slowMo
Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserConnectOptions { interface BrowserConnectOptions {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserConnectOptions.targetFilter
Callback to decide if Puppeteer should connect to a given target or not. Callback to decide if Puppeteer should connect to a given target or not.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserConnectOptions { interface BrowserConnectOptions {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext.browser
The browser this browser context belongs to. The browser this browser context belongs to.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext.clearPermissionOverrides
Clears all permission overrides for the browser context. Clears all permission overrides for the browser context.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext.close
Closes the browser context. All the targets that belong to the browser context will be closed. Closes the browser context. All the targets that belong to the browser context will be closed.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserContext.id
# BrowserContext.id property # BrowserContext.id property
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext.isIncognito
Returns whether BrowserContext is incognito. The default browser context is the only non-incognito browser context. Returns whether BrowserContext is incognito. The default browser context is the only non-incognito browser context.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext
BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method [Browser.newPage](./puppeteer.browser.newpage.md) creates a page in the default browser context. BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method [Browser.newPage](./puppeteer.browser.newpage.md) creates a page in the default browser context.
**Signature:** #### Signature:
```typescript ```typescript
export declare class BrowserContext extends EventEmitter export declare class BrowserContext extends EventEmitter

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext.newPage
Creates a new page in the browser context. Creates a new page in the browser context.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserContext.overridePermissions
# BrowserContext.overridePermissions() method # BrowserContext.overridePermissions() method
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext.pages
An array of all pages inside the browser context. An array of all pages inside the browser context.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext.targets
An array of all active targets inside the browser context. An array of all active targets inside the browser context.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContext.waitForTarget
This searches for a target in this specific browser context. This searches for a target in this specific browser context.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserContext { class BrowserContext {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserContextEmittedEvents
# BrowserContextEmittedEvents enum # BrowserContextEmittedEvents enum
**Signature:** #### Signature:
```typescript ```typescript
export declare const enum BrowserContextEmittedEvents export declare const enum BrowserContextEmittedEvents

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContextOptions
BrowserContext options. BrowserContext options.
**Signature:** #### Signature:
```typescript ```typescript
export interface BrowserContextOptions export interface BrowserContextOptions
@ -14,7 +14,7 @@ export interface BrowserContextOptions
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| ------------------------------------------------------------------------ | --------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | ------------------------------------------------------------------------ | --------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| [proxyBypassList?](./puppeteer.browsercontextoptions.proxybypasslist.md) | | string\[\] | <i>(Optional)</i> Bypass the proxy for the given list of hosts. | | [proxyBypassList?](./puppeteer.browsercontextoptions.proxybypasslist.md) | | string\[\] | <i>(Optional)</i> Bypass the proxy for the given list of hosts. | |
| [proxyServer?](./puppeteer.browsercontextoptions.proxyserver.md) | | string | <i>(Optional)</i> Proxy server with optional port to use for all requests. Username and password can be set in <code>Page.authenticate</code>. | | [proxyServer?](./puppeteer.browsercontextoptions.proxyserver.md) | | string | <i>(Optional)</i> Proxy server with optional port to use for all requests. Username and password can be set in <code>Page.authenticate</code>. | |

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContextOptions.proxyBypassList
Bypass the proxy for the given list of hosts. Bypass the proxy for the given list of hosts.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserContextOptions { interface BrowserContextOptions {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserContextOptions.proxyServer
Proxy server with optional port to use for all requests. Username and password can be set in `Page.authenticate`. Proxy server with optional port to use for all requests. Username and password can be set in `Page.authenticate`.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserContextOptions { interface BrowserContextOptions {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserEmittedEvents
All the events a [browser instance](./puppeteer.browser.md) may emit. All the events a [browser instance](./puppeteer.browser.md) may emit.
**Signature:** #### Signature:
```typescript ```typescript
export declare const enum BrowserEmittedEvents export declare const enum BrowserEmittedEvents

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserFetcher.(constructor)
Constructs a browser fetcher for the given options. Constructs a browser fetcher for the given options.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserFetcher.canDownload
Initiates a HEAD request to check if the revision is available. Initiates a HEAD request to check if the revision is available.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserFetcher.download
Initiates a GET request to download the revision from the host. Initiates a GET request to download the revision from the host.
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcher.host
# BrowserFetcher.host() method # BrowserFetcher.host() method
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcher.localRevisions
# BrowserFetcher.localRevisions() method # BrowserFetcher.localRevisions() method
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserFetcher
BrowserFetcher can download and manage different versions of Chromium and Firefox. BrowserFetcher can download and manage different versions of Chromium and Firefox.
**Signature:** #### Signature:
```typescript ```typescript
export declare class BrowserFetcher export declare class BrowserFetcher

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcher.platform
# BrowserFetcher.platform() method # BrowserFetcher.platform() method
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcher.product
# BrowserFetcher.product() method # BrowserFetcher.product() method
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcher.remove
# BrowserFetcher.remove() method # BrowserFetcher.remove() method
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcher.revisionInfo
# BrowserFetcher.revisionInfo() method # BrowserFetcher.revisionInfo() method
**Signature:** #### Signature:
```typescript ```typescript
class BrowserFetcher { class BrowserFetcher {

View File

@ -6,10 +6,16 @@ sidebar_label: BrowserFetcherOptions.host
Determines the host that will be used for downloading. Determines the host that will be used for downloading.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherOptions { interface BrowserFetcherOptions {
host?: string; host?: string;
} }
``` ```
#### Default value:
Either
- https://storage.googleapis.com or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcherOptions
# BrowserFetcherOptions interface # BrowserFetcherOptions interface
**Signature:** #### Signature:
```typescript ```typescript
export interface BrowserFetcherOptions export interface BrowserFetcherOptions
@ -12,10 +12,10 @@ export interface BrowserFetcherOptions
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| ---------------------------------------------------------------------------- | --------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ | | ---------------------------------------------------------------------------- | --------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| [host?](./puppeteer.browserfetcheroptions.host.md) | | string | <i>(Optional)</i> Determines the host that will be used for downloading. | | [host?](./puppeteer.browserfetcheroptions.host.md) | | string | <i>(Optional)</i> Determines the host that will be used for downloading. | <p>Either</p><p>- https://storage.googleapis.com or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central</p> |
| [path](./puppeteer.browserfetcheroptions.path.md) | | string | Determines the path to download browsers to. | | [path](./puppeteer.browserfetcheroptions.path.md) | | string | Determines the path to download browsers to. | |
| [platform?](./puppeteer.browserfetcheroptions.platform.md) | | [Platform](./puppeteer.platform.md) | <i>(Optional)</i> Determines which platform the browser will be suited for. | | [platform?](./puppeteer.browserfetcheroptions.platform.md) | | [Platform](./puppeteer.platform.md) | <i>(Optional)</i> Determines which platform the browser will be suited for. | Auto-detected. |
| [product?](./puppeteer.browserfetcheroptions.product.md) | | 'chrome' \| 'firefox' | <i>(Optional)</i> Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. | | [product?](./puppeteer.browserfetcheroptions.product.md) | | 'chrome' \| 'firefox' | <i>(Optional)</i> Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. | <code>&quot;chrome&quot;</code>. |
| [useMacOSARMBinary?](./puppeteer.browserfetcheroptions.usemacosarmbinary.md) | | boolean | <i>(Optional)</i> Enables the use of the Chromium binary for macOS ARM. | | [useMacOSARMBinary?](./puppeteer.browserfetcheroptions.usemacosarmbinary.md) | | boolean | <i>(Optional)</i> Enables the use of the Chromium binary for macOS ARM. | |

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserFetcherOptions.path
Determines the path to download browsers to. Determines the path to download browsers to.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherOptions { interface BrowserFetcherOptions {

View File

@ -6,10 +6,14 @@ sidebar_label: BrowserFetcherOptions.platform
Determines which platform the browser will be suited for. Determines which platform the browser will be suited for.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherOptions { interface BrowserFetcherOptions {
platform?: Platform; platform?: Platform;
} }
``` ```
#### Default value:
Auto-detected.

View File

@ -6,10 +6,14 @@ sidebar_label: BrowserFetcherOptions.product
Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherOptions { interface BrowserFetcherOptions {
product?: 'chrome' | 'firefox'; product?: 'chrome' | 'firefox';
} }
``` ```
#### Default value:
`"chrome"`.

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserFetcherOptions.useMacOSARMBinary
Enables the use of the Chromium binary for macOS ARM. Enables the use of the Chromium binary for macOS ARM.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherOptions { interface BrowserFetcherOptions {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcherRevisionInfo.executablePath
# BrowserFetcherRevisionInfo.executablePath property # BrowserFetcherRevisionInfo.executablePath property
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherRevisionInfo { interface BrowserFetcherRevisionInfo {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcherRevisionInfo.folderPath
# BrowserFetcherRevisionInfo.folderPath property # BrowserFetcherRevisionInfo.folderPath property
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherRevisionInfo { interface BrowserFetcherRevisionInfo {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcherRevisionInfo.local
# BrowserFetcherRevisionInfo.local property # BrowserFetcherRevisionInfo.local property
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherRevisionInfo { interface BrowserFetcherRevisionInfo {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcherRevisionInfo
# BrowserFetcherRevisionInfo interface # BrowserFetcherRevisionInfo interface
**Signature:** #### Signature:
```typescript ```typescript
export interface BrowserFetcherRevisionInfo export interface BrowserFetcherRevisionInfo
@ -12,11 +12,11 @@ export interface BrowserFetcherRevisionInfo
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| -------------------------------------------------------------------------- | --------- | ------- | ----------- | | -------------------------------------------------------------------------- | --------- | ------- | ----------- | ------- |
| [executablePath](./puppeteer.browserfetcherrevisioninfo.executablepath.md) | | string | | | [executablePath](./puppeteer.browserfetcherrevisioninfo.executablepath.md) | | string | | |
| [folderPath](./puppeteer.browserfetcherrevisioninfo.folderpath.md) | | string | | | [folderPath](./puppeteer.browserfetcherrevisioninfo.folderpath.md) | | string | | |
| [local](./puppeteer.browserfetcherrevisioninfo.local.md) | | boolean | | | [local](./puppeteer.browserfetcherrevisioninfo.local.md) | | boolean | | |
| [product](./puppeteer.browserfetcherrevisioninfo.product.md) | | string | | | [product](./puppeteer.browserfetcherrevisioninfo.product.md) | | string | | |
| [revision](./puppeteer.browserfetcherrevisioninfo.revision.md) | | string | | | [revision](./puppeteer.browserfetcherrevisioninfo.revision.md) | | string | | |
| [url](./puppeteer.browserfetcherrevisioninfo.url.md) | | string | | | [url](./puppeteer.browserfetcherrevisioninfo.url.md) | | string | | |

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcherRevisionInfo.product
# BrowserFetcherRevisionInfo.product property # BrowserFetcherRevisionInfo.product property
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherRevisionInfo { interface BrowserFetcherRevisionInfo {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcherRevisionInfo.revision
# BrowserFetcherRevisionInfo.revision property # BrowserFetcherRevisionInfo.revision property
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherRevisionInfo { interface BrowserFetcherRevisionInfo {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserFetcherRevisionInfo.url
# BrowserFetcherRevisionInfo.url property # BrowserFetcherRevisionInfo.url property
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserFetcherRevisionInfo { interface BrowserFetcherRevisionInfo {

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserLaunchArgumentOptions.args
Additional command line arguments to pass to the browser instance. Additional command line arguments to pass to the browser instance.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserLaunchArgumentOptions { interface BrowserLaunchArgumentOptions {

View File

@ -4,7 +4,7 @@ sidebar_label: BrowserLaunchArgumentOptions.debuggingPort
# BrowserLaunchArgumentOptions.debuggingPort property # BrowserLaunchArgumentOptions.debuggingPort property
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserLaunchArgumentOptions { interface BrowserLaunchArgumentOptions {

View File

@ -6,10 +6,14 @@ sidebar_label: BrowserLaunchArgumentOptions.devtools
Whether to auto-open a DevTools panel for each tab. If this is set to `true`, then `headless` will be forced to `false`. Whether to auto-open a DevTools panel for each tab. If this is set to `true`, then `headless` will be forced to `false`.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserLaunchArgumentOptions { interface BrowserLaunchArgumentOptions {
devtools?: boolean; devtools?: boolean;
} }
``` ```
#### Default value:
`false`

View File

@ -6,10 +6,14 @@ sidebar_label: BrowserLaunchArgumentOptions.headless
Whether to run the browser in headless mode. Whether to run the browser in headless mode.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserLaunchArgumentOptions { interface BrowserLaunchArgumentOptions {
headless?: boolean | 'chrome'; headless?: boolean | 'chrome';
} }
``` ```
#### Default value:
true

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserLaunchArgumentOptions
Launcher options that only apply to Chrome. Launcher options that only apply to Chrome.
**Signature:** #### Signature:
```typescript ```typescript
export interface BrowserLaunchArgumentOptions export interface BrowserLaunchArgumentOptions
@ -14,10 +14,10 @@ export interface BrowserLaunchArgumentOptions
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| --------------------------------------------------------------------------- | --------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --------------------------------------------------------------------------- | --------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| [args?](./puppeteer.browserlaunchargumentoptions.args.md) | | string\[\] | <i>(Optional)</i> Additional command line arguments to pass to the browser instance. | | [args?](./puppeteer.browserlaunchargumentoptions.args.md) | | string\[\] | <i>(Optional)</i> Additional command line arguments to pass to the browser instance. | |
| [debuggingPort?](./puppeteer.browserlaunchargumentoptions.debuggingport.md) | | number | <i>(Optional)</i> | | [debuggingPort?](./puppeteer.browserlaunchargumentoptions.debuggingport.md) | | number | <i>(Optional)</i> | |
| [devtools?](./puppeteer.browserlaunchargumentoptions.devtools.md) | | boolean | <i>(Optional)</i> Whether to auto-open a DevTools panel for each tab. If this is set to <code>true</code>, then <code>headless</code> will be forced to <code>false</code>. | | [devtools?](./puppeteer.browserlaunchargumentoptions.devtools.md) | | boolean | <i>(Optional)</i> Whether to auto-open a DevTools panel for each tab. If this is set to <code>true</code>, then <code>headless</code> will be forced to <code>false</code>. | <code>false</code> |
| [headless?](./puppeteer.browserlaunchargumentoptions.headless.md) | | boolean \| 'chrome' | <i>(Optional)</i> Whether to run the browser in headless mode. | | [headless?](./puppeteer.browserlaunchargumentoptions.headless.md) | | boolean \| 'chrome' | <i>(Optional)</i> Whether to run the browser in headless mode. | true |
| [userDataDir?](./puppeteer.browserlaunchargumentoptions.userdatadir.md) | | string | <i>(Optional)</i> Path to a user data directory. [see the Chromium docs](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md) for more info. | | [userDataDir?](./puppeteer.browserlaunchargumentoptions.userdatadir.md) | | string | <i>(Optional)</i> Path to a user data directory. [see the Chromium docs](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md) for more info. | |

View File

@ -6,7 +6,7 @@ sidebar_label: BrowserLaunchArgumentOptions.userDataDir
Path to a user data directory. [see the Chromium docs](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md) for more info. Path to a user data directory. [see the Chromium docs](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md) for more info.
**Signature:** #### Signature:
```typescript ```typescript
interface BrowserLaunchArgumentOptions { interface BrowserLaunchArgumentOptions {

View File

@ -4,7 +4,7 @@ sidebar_label: CDPSession.connection
# CDPSession.connection() method # CDPSession.connection() method
**Signature:** #### Signature:
```typescript ```typescript
class CDPSession { class CDPSession {

View File

@ -6,7 +6,7 @@ sidebar_label: CDPSession.detach
Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used to send messages. Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used to send messages.
**Signature:** #### Signature:
```typescript ```typescript
class CDPSession { class CDPSession {

View File

@ -6,7 +6,7 @@ sidebar_label: CDPSession.id
Returns the session's id. Returns the session's id.
**Signature:** #### Signature:
```typescript ```typescript
class CDPSession { class CDPSession {

View File

@ -6,7 +6,7 @@ sidebar_label: CDPSession
The `CDPSession` instances are used to talk raw Chrome Devtools Protocol. The `CDPSession` instances are used to talk raw Chrome Devtools Protocol.
**Signature:** #### Signature:
```typescript ```typescript
export declare class CDPSession extends EventEmitter export declare class CDPSession extends EventEmitter

View File

@ -4,7 +4,7 @@ sidebar_label: CDPSession.send
# CDPSession.send() method # CDPSession.send() method
**Signature:** #### Signature:
```typescript ```typescript
class CDPSession { class CDPSession {

View File

@ -4,7 +4,7 @@ sidebar_label: CDPSessionOnMessageObject.error
# CDPSessionOnMessageObject.error property # CDPSessionOnMessageObject.error property
**Signature:** #### Signature:
```typescript ```typescript
interface CDPSessionOnMessageObject { interface CDPSessionOnMessageObject {

View File

@ -4,7 +4,7 @@ sidebar_label: CDPSessionOnMessageObject.id
# CDPSessionOnMessageObject.id property # CDPSessionOnMessageObject.id property
**Signature:** #### Signature:
```typescript ```typescript
interface CDPSessionOnMessageObject { interface CDPSessionOnMessageObject {

View File

@ -4,7 +4,7 @@ sidebar_label: CDPSessionOnMessageObject
# CDPSessionOnMessageObject interface # CDPSessionOnMessageObject interface
**Signature:** #### Signature:
```typescript ```typescript
export interface CDPSessionOnMessageObject export interface CDPSessionOnMessageObject
@ -12,10 +12,10 @@ export interface CDPSessionOnMessageObject
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| ---------------------------------------------------------- | --------- | --------------------------------------------- | ----------------- | | ---------------------------------------------------------- | --------- | --------------------------------------------- | ----------------- | ------- |
| [error](./puppeteer.cdpsessiononmessageobject.error.md) | | { message: string; data: any; code: number; } | | | [error](./puppeteer.cdpsessiononmessageobject.error.md) | | { message: string; data: any; code: number; } | | |
| [id?](./puppeteer.cdpsessiononmessageobject.id.md) | | number | <i>(Optional)</i> | | [id?](./puppeteer.cdpsessiononmessageobject.id.md) | | number | <i>(Optional)</i> | |
| [method](./puppeteer.cdpsessiononmessageobject.method.md) | | string | | | [method](./puppeteer.cdpsessiononmessageobject.method.md) | | string | | |
| [params](./puppeteer.cdpsessiononmessageobject.params.md) | | Record&lt;string, unknown&gt; | | | [params](./puppeteer.cdpsessiononmessageobject.params.md) | | Record&lt;string, unknown&gt; | | |
| [result?](./puppeteer.cdpsessiononmessageobject.result.md) | | any | <i>(Optional)</i> | | [result?](./puppeteer.cdpsessiononmessageobject.result.md) | | any | <i>(Optional)</i> | |

View File

@ -4,7 +4,7 @@ sidebar_label: CDPSessionOnMessageObject.method
# CDPSessionOnMessageObject.method property # CDPSessionOnMessageObject.method property
**Signature:** #### Signature:
```typescript ```typescript
interface CDPSessionOnMessageObject { interface CDPSessionOnMessageObject {

View File

@ -4,7 +4,7 @@ sidebar_label: CDPSessionOnMessageObject.params
# CDPSessionOnMessageObject.params property # CDPSessionOnMessageObject.params property
**Signature:** #### Signature:
```typescript ```typescript
interface CDPSessionOnMessageObject { interface CDPSessionOnMessageObject {

View File

@ -4,7 +4,7 @@ sidebar_label: CDPSessionOnMessageObject.result
# CDPSessionOnMessageObject.result property # CDPSessionOnMessageObject.result property
**Signature:** #### Signature:
```typescript ```typescript
interface CDPSessionOnMessageObject { interface CDPSessionOnMessageObject {

View File

@ -4,7 +4,7 @@ sidebar_label: ChromeReleaseChannel
# ChromeReleaseChannel type # ChromeReleaseChannel type
**Signature:** #### Signature:
```typescript ```typescript
export declare type ChromeReleaseChannel = export declare type ChromeReleaseChannel =

View File

@ -8,7 +8,7 @@ sidebar_label: clearCustomQueryHandlers
> >
> Import [Puppeteer](./puppeteer.puppeteer.md) and use the static method [Puppeteer.clearCustomQueryHandlers()](./puppeteer.puppeteer.clearcustomqueryhandlers.md) > Import [Puppeteer](./puppeteer.puppeteer.md) and use the static method [Puppeteer.clearCustomQueryHandlers()](./puppeteer.puppeteer.clearcustomqueryhandlers.md)
**Signature:** #### Signature:
```typescript ```typescript
export declare function clearCustomQueryHandlers(): void; export declare function clearCustomQueryHandlers(): void;

View File

@ -4,10 +4,14 @@ sidebar_label: ClickOptions.button
# ClickOptions.button property # ClickOptions.button property
**Signature:** #### Signature:
```typescript ```typescript
interface ClickOptions { interface ClickOptions {
button?: MouseButton; button?: MouseButton;
} }
``` ```
#### Default value:
'left'

View File

@ -4,10 +4,14 @@ sidebar_label: ClickOptions.clickCount
# ClickOptions.clickCount property # ClickOptions.clickCount property
**Signature:** #### Signature:
```typescript ```typescript
interface ClickOptions { interface ClickOptions {
clickCount?: number; clickCount?: number;
} }
``` ```
#### Default value:
1

View File

@ -6,10 +6,14 @@ sidebar_label: ClickOptions.delay
Time to wait between `mousedown` and `mouseup` in milliseconds. Time to wait between `mousedown` and `mouseup` in milliseconds.
**Signature:** #### Signature:
```typescript ```typescript
interface ClickOptions { interface ClickOptions {
delay?: number; delay?: number;
} }
``` ```
#### Default value:
0

View File

@ -4,7 +4,7 @@ sidebar_label: ClickOptions
# ClickOptions interface # ClickOptions interface
**Signature:** #### Signature:
```typescript ```typescript
export interface ClickOptions export interface ClickOptions
@ -12,9 +12,9 @@ export interface ClickOptions
## Properties ## Properties
| Property | Modifiers | Type | Description | | Property | Modifiers | Type | Description | Default |
| ----------------------------------------------------- | --------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------- | | ----------------------------------------------------- | --------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------- |
| [button?](./puppeteer.clickoptions.button.md) | | [MouseButton](./puppeteer.mousebutton.md) | <i>(Optional)</i> | | [button?](./puppeteer.clickoptions.button.md) | | [MouseButton](./puppeteer.mousebutton.md) | <i>(Optional)</i> | 'left' |
| [clickCount?](./puppeteer.clickoptions.clickcount.md) | | number | <i>(Optional)</i> | | [clickCount?](./puppeteer.clickoptions.clickcount.md) | | number | <i>(Optional)</i> | 1 |
| [delay?](./puppeteer.clickoptions.delay.md) | | number | <i>(Optional)</i> Time to wait between <code>mousedown</code> and <code>mouseup</code> in milliseconds. | | [delay?](./puppeteer.clickoptions.delay.md) | | number | <i>(Optional)</i> Time to wait between <code>mousedown</code> and <code>mouseup</code> in milliseconds. | 0 |
| [offset?](./puppeteer.clickoptions.offset.md) | | [Offset](./puppeteer.offset.md) | <i>(Optional)</i> Offset for the clickable point relative to the top-left corner of the border box. | | [offset?](./puppeteer.clickoptions.offset.md) | | [Offset](./puppeteer.offset.md) | <i>(Optional)</i> Offset for the clickable point relative to the top-left corner of the border box. | |

View File

@ -6,7 +6,7 @@ sidebar_label: ClickOptions.offset
Offset for the clickable point relative to the top-left corner of the border box. Offset for the clickable point relative to the top-left corner of the border box.
**Signature:** #### Signature:
```typescript ```typescript
interface ClickOptions { interface ClickOptions {

Some files were not shown because too many files have changed in this diff Show More