feat: experimental WebDriver BiDi support with Firefox (#11412)

Co-authored-by: Jecelyn Yeen <5917927+jecfish@users.noreply.github.com>
This commit is contained in:
Alex Rudenko 2023-11-28 13:07:53 +01:00 committed by GitHub
parent 6a944bf8aa
commit 8aba033dde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 269 additions and 485 deletions

View File

@ -198,6 +198,7 @@ sidebar_label: API
| [Predicate](./puppeteer.predicate.md) | | | [Predicate](./puppeteer.predicate.md) | |
| [Product](./puppeteer.product.md) | Supported products. | | [Product](./puppeteer.product.md) | Supported products. |
| [ProtocolLifeCycleEvent](./puppeteer.protocollifecycleevent.md) | | | [ProtocolLifeCycleEvent](./puppeteer.protocollifecycleevent.md) | |
| [ProtocolType](./puppeteer.protocoltype.md) | |
| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) | | | [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) | |
| [PuppeteerNodeLaunchOptions](./puppeteer.puppeteernodelaunchoptions.md) | Utility type exposed to enable users to define options that can be passed to <code>puppeteer.launch</code> without having to list the set of all types. | | [PuppeteerNodeLaunchOptions](./puppeteer.puppeteernodelaunchoptions.md) | Utility type exposed to enable users to define options that can be passed to <code>puppeteer.launch</code> without having to list the set of all types. |
| [Quad](./puppeteer.quad.md) | | | [Quad](./puppeteer.quad.md) | |

View File

@ -18,6 +18,7 @@ export interface BrowserConnectOptions
| ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------- | | ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------- |
| defaultViewport | <code>optional</code> | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | '{width: 800, height: 600}' | | defaultViewport | <code>optional</code> | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | '{width: 800, height: 600}' |
| ignoreHTTPSErrors | <code>optional</code> | boolean | Whether to ignore HTTPS errors during navigation. | <code>false</code> | | ignoreHTTPSErrors | <code>optional</code> | boolean | Whether to ignore HTTPS errors during navigation. | <code>false</code> |
| protocol | <code>optional</code> | [ProtocolType](./puppeteer.protocoltype.md) | | 'cdp' |
| protocolTimeout | <code>optional</code> | number | Timeout setting for individual protocol (CDP) calls. | <code>180_000</code> | | protocolTimeout | <code>optional</code> | number | Timeout setting for individual protocol (CDP) calls. | <code>180_000</code> |
| slowMo | <code>optional</code> | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | | | slowMo | <code>optional</code> | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | |
| targetFilter | <code>optional</code> | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | | | targetFilter | <code>optional</code> | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | |

View File

@ -28,6 +28,8 @@ Promise&lt;void&gt;
## Remarks ## Remarks
This method is a shortcut for calling two methods: [Page.setUserAgent()](./puppeteer.page.setuseragent.md) and [Page.setViewport()](./puppeteer.page.setviewport.md).
This method will resize the page. A lot of websites don't expect phones to change size, so you should emulate before navigating to the page. This method will resize the page. A lot of websites don't expect phones to change size, so you should emulate before navigating to the page.
## Example ## Example

View File

@ -32,8 +32,6 @@ class Page {
Promise&lt;void&gt; Promise&lt;void&gt;
## Remarks
## Example ## Example
```ts ```ts

View File

@ -0,0 +1,11 @@
---
sidebar_label: ProtocolType
---
# ProtocolType type
#### Signature:
```typescript
export type ProtocolType = 'cdp' | 'webDriverBiDi';
```

View File

@ -27,6 +27,16 @@ support to browsers such as Safari. This effort includes exploration of a
standard for executing cross-browser commands (instead of relying on the standard for executing cross-browser commands (instead of relying on the
non-standard DevTools Protocol used by Chrome). non-standard DevTools Protocol used by Chrome).
Update 2023-11-17: Puppeteer has experimental support for the new
[WebDriverBiDi](https://w3c.github.io/webdriver-bidi/) protocol that can be used
to automate Firefox. The WebDriver BiDi implementation in Firefox will replace
the current CDP implementation in Firefox in the future. See
https://pptr.dev/webdriver-bidi for more details.
## Q: Does Puppeteer support WebDriver BiDi?
Puppeteer has experimental support for WebDriver BiDi. See https://pptr.dev/webdriver-bidi.
## Q: What are Puppeteers goals and principles? ## Q: What are Puppeteers goals and principles?
The goals of the project are: The goals of the project are:

189
docs/webdriver-bidi.md Normal file
View File

@ -0,0 +1,189 @@
# Experimental WebDriver BiDi Support
[WebDriver BiDi](https://w3c.github.io/webdriver-bidi/) is a new cross-browser
automation protocol that adds browser-driven events to WebDriver. Here are the
resources if you want to learn more about WebDriver BiDi:
- [WebDriver BiDi - The future of cross-browser automation](https://developer.chrome.com/articles/webdriver-bidi/)
- [WebDriver BiDi: 2023 status update](https://developer.chrome.com/blog/webdriver-bidi-2023/)
## Automate with Chrome and Firefox
Firefox support has almost reaching feature parity with the previous CDP-based
implementation. To see which features are fully supported with WebDriver BiDi we
used the [Puppeteer test suite](https://puppeteer.github.io/ispuppeteerwebdriverbidiready/). Currently,
we still have fewer than
[60](https://puppeteer.github.io/ispuppeteerwebdriverbidiready/firefox-delta.json)
tests that are failing with Firefox and WebDriver BiDi compared to the previous
CDP implementation in Firefox but we also have more than
[82](https://puppeteer.github.io/ispuppeteerwebdriverbidiready/firefox-delta.json)
new tests that work with WebDriver BiDi and that didn't work with CDP.
For Chrome, around 68% of the tests are currently passing with WebDriver BiDi so
the CDP-based implementation remains more powerful. Some of the Puppeteer
functionality is relying on CDP even with WebDriver BiDi enabled. Therefore, the
test pass rate is currently higher than that one of Firefox.
Example of launching Firefox with WebDriver BiDi:
```ts
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({
product: 'firefox',
protocol: 'webDriverBiDi',
});
const page = await browser.newPage();
...
await browser.close();
```
Example of launching Chrome with WebDriver BiDi:
```ts
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({
product: 'chrome',
protocol: 'webDriverBiDi',
});
const page = await browser.newPage();
...
await browser.close();
```
## Puppeteer features supported over WebDriver BiDi
- Browser and page automation
- Browser.close
- Frame.goto() (except `referer` and `referrerPolicy`)
- Page.bringToFront
- Page.goto (except `referer` and `referrerPolicy`)
- Page.reload (except for `ignoreCache` parameter)
- Page.setViewport (`width`, `height`, `deviceScaleFactor` only)
- Puppeteer.launch
- [Script evaluation](https://pptr.dev/guides/evaluate-javascript):
- JSHandle.evaluate
- JSHandle.evaluateHandle
- Page.evaluate
- Page.exposeFunction
- [Selectors](https://pptr.dev/guides/query-selectors) and [locators](https://pptr.dev/guides/locators) except for ARIA:
- Page.$ (ARIA selectors supported in Chrome)
- Page.$$ (ARIA selectors supported in Chrome)
- Page.$$eval (ARIA selectors supported in Chrome)
- Page.$eval (ARIA selectors supported in Chrome)
- Page.waitForSelector (ARIA selectors supported in Chrome)
- Input
- ElementHandle.click
- Keyboard.down
- Keyboard.press
- Keyboard.sendCharacter
- Keyboard.type
- Keyboard.up
- Mouse events (except for dedicated drag'n'drop API methods)
- Page.tap
- TouchScreen.\*
- JavaScript dialog interception
- page.on('dialog')
- Dialog.\*
- Screenshots (not all parameters are supported)
- Page.screenshot (supported parameters `clip`, `encoding`, `fullPage`)
- PDF generation (not all parameters are supported)
- Page.pdf (only `format`, `height`, `landscape`, `margin`, `pageRanges`, `printBackground`, `scale`, `width` are supported)
- Page.createPDFStream (only `format`, `height`, `landscape`, `margin`, `pageRanges`, `printBackground`, `scale`, `width` are supported)
## Puppeteer features not yet supported over WebDriver BiDi
- [Request interception](https://pptr.dev/guides/request-interception)
- HTTPRequest.abort()
- HTTPRequest.abortErrorReason()
- HTTPRequest.client()
- HTTPRequest.continue()
- HTTPRequest.continueRequestOverrides()
- HTTPRequest.failure()
- HTTPRequest.finalizeInterceptions()
- HTTPRequest.interceptResolutionState()
- HTTPRequest.isInterceptResolutionHandled()
- HTTPRequest.respond()
- HTTPRequest.responseForRequest()
- Page.setRequestInterception()
- Permissions
- BrowserContext.clearPermissionOverrides()
- BrowserContext.overridePermissions()
- Various emulations (most are supported with Chrome)
- Page.emulate() (supported only in Chrome)
- Page.emulateCPUThrottling() (supported only in Chrome)
- Page.emulateIdleState() (supported only in Chrome)
- Page.emulateMediaFeatures() (supported only in Chrome)
- Page.emulateMediaType() (supported only in Chrome)
- Page.emulateTimezone() (supported only in Chrome)
- Page.emulateVisionDeficiency() (supported only in Chrome)
- Page.setBypassCSP() (supported only in Chrome)
- Page.setCacheEnabled() (supported only in Chrome)
- Page.setGeolocation() (supported only in Chrome)
- Page.setJavaScriptEnabled() (supported only in Chrome)
- CDP-specific features
- Page.createCDPSession() (supported only in Chrome)
- Tracing (supported only in Chrome)
- Coverage (supported only in Chrome)
- Accessibility (supported only in Chrome)
- Other methods:
- Browser.userAgent()
- ElementHandle.uploadFile()
- Frame.isOOPFrame()
- Frame.waitForDevicePrompt()
- HTTPResponse.buffer()
- HTTPResponse.fromServiceWorker()
- HTTPResponse.securityDetails()
- Input.drag()
- Input.dragAndDrop()
- Input.dragOver()
- Input.drop()
- Page.authenticate()
- Page.cookies()
- Page.deleteCookie()
- Page.emulateNetworkConditions()
- Page.goBack()
- Page.goForward()
- Page.isDragInterceptionEnabled()
- Page.isJavaScriptEnabled() (supported only in Chrome)
- Page.isServiceWorkerBypassed()
- Page.metrics()
- Page.queryObjects() (supported only in Chrome)
- Page.screencast() (supported only in Chrome)
- Page.setBypassServiceWorker()
- Page.setCookie()
- Page.setDragInterception()
- Page.setExtraHTTPHeaders()
- Page.setOfflineMode()
- Page.setUserAgent()
- Page.waitForDevicePrompt()
- Page.waitForFileChooser()
- Page.workers()
- PageEvent.popup
- PageEvent.WorkerCreated
- PageEvent.WorkerDestroyed
- Target.opener()

View File

@ -401,10 +401,6 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
* {@link Page | Pages} can override the user agent with * {@link Page | Pages} can override the user agent with
* {@link Page.setUserAgent}. * {@link Page.setUserAgent}.
* *
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract userAgent(): Promise<string>; abstract userAgent(): Promise<string>;

View File

@ -164,11 +164,6 @@ export abstract class BrowserContext extends EventEmitter<BrowserContextEvents>
* "https://example.com". * "https://example.com".
* @param permissions - An array of permissions to grant. All permissions that * @param permissions - An array of permissions to grant. All permissions that
* are not listed here will be automatically denied. * are not listed here will be automatically denied.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract overridePermissions( abstract overridePermissions(
origin: string, origin: string,
@ -188,11 +183,6 @@ export abstract class BrowserContext extends EventEmitter<BrowserContextEvents>
* // do stuff .. * // do stuff ..
* context.clearPermissionOverrides(); * context.clearPermissionOverrides();
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract clearPermissionOverrides(): Promise<void>; abstract clearPermissionOverrides(): Promise<void>;

View File

@ -962,11 +962,6 @@ export abstract class ElementHandle<
* {@link https://nodejs.org/api/process.html#process_process_cwd | current working directory}. * {@link https://nodejs.org/api/process.html#process_process_cwd | current working directory}.
* For locals script connecting to remote chrome environments, paths must be * For locals script connecting to remote chrome environments, paths must be
* absolute. * absolute.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract uploadFile( abstract uploadFile(
this: ElementHandle<HTMLInputElement>, this: ElementHandle<HTMLInputElement>,

View File

@ -311,11 +311,6 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
/** /**
* Is `true` if the frame is an out-of-process (OOP) frame. Otherwise, * Is `true` if the frame is an out-of-process (OOP) frame. Otherwise,
* `false`. * `false`.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract isOOPFrame(): boolean; abstract isOOPFrame(): boolean;
@ -352,14 +347,6 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
* returned by the remote server, including 404 "Not Found" and 500 "Internal * returned by the remote server, including 404 "Not Found" and 500 "Internal
* Server Error". The status code for such responses can be retrieved by * Server Error". The status code for such responses can be retrieved by
* calling {@link HTTPResponse.status}. * calling {@link HTTPResponse.status}.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support
*
* - `referer` not supported
* - `referrerPolicy` not supported
*/ */
abstract goto( abstract goto(
url: string, url: string,
@ -1209,11 +1196,6 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
* ); * );
* ``` * ```
* *
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* @internal * @internal
*/ */
abstract waitForDevicePrompt( abstract waitForDevicePrompt(

View File

@ -130,11 +130,6 @@ export abstract class HTTPRequest {
* Warning! Using this client can break Puppeteer. Use with caution. * Warning! Using this client can break Puppeteer. Use with caution.
* *
* @experimental * @experimental
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract get client(): CDPSession; abstract get client(): CDPSession;
@ -152,32 +147,17 @@ export abstract class HTTPRequest {
* The `ContinueRequestOverrides` that will be used * The `ContinueRequestOverrides` that will be used
* if the interception is allowed to continue (ie, `abort()` and * if the interception is allowed to continue (ie, `abort()` and
* `respond()` aren't called). * `respond()` aren't called).
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract continueRequestOverrides(): ContinueRequestOverrides; abstract continueRequestOverrides(): ContinueRequestOverrides;
/** /**
* The `ResponseForRequest` that gets used if the * The `ResponseForRequest` that gets used if the
* interception is allowed to respond (ie, `abort()` is not called). * interception is allowed to respond (ie, `abort()` is not called).
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract responseForRequest(): Partial<ResponseForRequest> | null; abstract responseForRequest(): Partial<ResponseForRequest> | null;
/** /**
* The most recent reason for aborting the request * The most recent reason for aborting the request
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract abortErrorReason(): Protocol.Network.ErrorReason | null; abstract abortErrorReason(): Protocol.Network.ErrorReason | null;
@ -191,22 +171,12 @@ export abstract class HTTPRequest {
* *
* InterceptResolutionAction is one of: `abort`, `respond`, `continue`, * InterceptResolutionAction is one of: `abort`, `respond`, `continue`,
* `disabled`, `none`, or `already-handled`. * `disabled`, `none`, or `already-handled`.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract interceptResolutionState(): InterceptResolutionState; abstract interceptResolutionState(): InterceptResolutionState;
/** /**
* Is `true` if the intercept resolution has already been handled, * Is `true` if the intercept resolution has already been handled,
* `false` otherwise. * `false` otherwise.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract isInterceptResolutionHandled(): boolean; abstract isInterceptResolutionHandled(): boolean;
@ -223,11 +193,6 @@ export abstract class HTTPRequest {
/** /**
* Awaits pending interception handlers and then decides how to fulfill * Awaits pending interception handlers and then decides how to fulfill
* the request interception. * the request interception.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract finalizeInterceptions(): Promise<void>; abstract finalizeInterceptions(): Promise<void>;
@ -323,24 +288,12 @@ export abstract class HTTPRequest {
* return an object with `errorText` containing a human-readable error * return an object with `errorText` containing a human-readable error
* message, e.g. `net::ERR_FAILED`. It is not guaranteed that there will be * message, e.g. `net::ERR_FAILED`. It is not guaranteed that there will be
* failure text if the request fails. * failure text if the request fails.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract failure(): {errorText: string} | null; abstract failure(): {errorText: string} | null;
/** /**
* Continues request with optional request overrides. * Continues request with optional request overrides.
* *
* @remarks
*
* To use this, request
* interception should be enabled with {@link Page.setRequestInterception}.
*
* Exception is immediately thrown if the request interception is not enabled.
*
* @example * @example
* *
* ```ts * ```ts
@ -356,14 +309,15 @@ export abstract class HTTPRequest {
* ``` * ```
* *
* @param overrides - optional overrides to apply to the request. * @param overrides - optional overrides to apply to the request.
* @param priority - If provided, intercept is resolved using * @param priority - If provided, intercept is resolved using cooperative
* cooperative handling rules. Otherwise, intercept is resolved * handling rules. Otherwise, intercept is resolved immediately.
* immediately.
* *
* @privateRemarks BiDi * @remarks
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
* *
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported * To use this, request interception should be enabled with
* {@link Page.setRequestInterception}.
*
* Exception is immediately thrown if the request interception is not enabled.
*/ */
abstract continue( abstract continue(
overrides?: ContinueRequestOverrides, overrides?: ContinueRequestOverrides,
@ -373,13 +327,6 @@ export abstract class HTTPRequest {
/** /**
* Fulfills a request with the given response. * Fulfills a request with the given response.
* *
* @remarks
*
* To use this, request
* interception should be enabled with {@link Page.setRequestInterception}.
*
* Exception is immediately thrown if the request interception is not enabled.
*
* @example * @example
* An example of fulfilling all requests with 404 responses: * An example of fulfilling all requests with 404 responses:
* *
@ -402,10 +349,12 @@ export abstract class HTTPRequest {
* cooperative handling rules. Otherwise, intercept is resolved * cooperative handling rules. Otherwise, intercept is resolved
* immediately. * immediately.
* *
* @privateRemarks BiDi * @remarks
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
* *
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported * To use this, request
* interception should be enabled with {@link Page.setRequestInterception}.
*
* Exception is immediately thrown if the request interception is not enabled.
*/ */
abstract respond( abstract respond(
response: Partial<ResponseForRequest>, response: Partial<ResponseForRequest>,
@ -415,20 +364,16 @@ export abstract class HTTPRequest {
/** /**
* Aborts a request. * Aborts a request.
* *
* @remarks
* To use this, request interception should be enabled with
* {@link Page.setRequestInterception}. If it is not enabled, this method will
* throw an exception immediately.
*
* @param errorCode - optional error code to provide. * @param errorCode - optional error code to provide.
* @param priority - If provided, intercept is resolved using * @param priority - If provided, intercept is resolved using
* cooperative handling rules. Otherwise, intercept is resolved * cooperative handling rules. Otherwise, intercept is resolved
* immediately. * immediately.
* *
* @privateRemarks BiDi * @remarks
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
* *
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported * To use this, request interception should be enabled with
* {@link Page.setRequestInterception}. If it is not enabled, this method will
* throw an exception immediately.
*/ */
abstract abort(errorCode?: ErrorCode, priority?: number): Promise<void>; abstract abort(errorCode?: ErrorCode, priority?: number): Promise<void>;
} }

View File

@ -81,11 +81,6 @@ export abstract class HTTPResponse {
/** /**
* {@link SecurityDetails} if the response was received over the * {@link SecurityDetails} if the response was received over the
* secure connection, or `null` otherwise. * secure connection, or `null` otherwise.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract securityDetails(): SecurityDetails | null; abstract securityDetails(): SecurityDetails | null;
@ -96,11 +91,6 @@ export abstract class HTTPResponse {
/** /**
* Promise which resolves to a buffer with response body. * Promise which resolves to a buffer with response body.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract buffer(): Promise<Buffer>; abstract buffer(): Promise<Buffer>;
@ -138,11 +128,6 @@ export abstract class HTTPResponse {
/** /**
* True if the response was served by a service worker. * True if the response was served by a service worker.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract fromServiceWorker(): boolean; abstract fromServiceWorker(): boolean;

View File

@ -435,11 +435,6 @@ export abstract class Mouse {
* Dispatches a `drag` event. * Dispatches a `drag` event.
* @param start - starting point for drag * @param start - starting point for drag
* @param target - point to drag to * @param target - point to drag to
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract drag(start: Point, target: Point): Promise<Protocol.Input.DragData>; abstract drag(start: Point, target: Point): Promise<Protocol.Input.DragData>;
@ -447,11 +442,6 @@ export abstract class Mouse {
* Dispatches a `dragenter` event. * Dispatches a `dragenter` event.
* @param target - point for emitting `dragenter` event * @param target - point for emitting `dragenter` event
* @param data - drag data containing items and operations mask * @param data - drag data containing items and operations mask
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract dragEnter( abstract dragEnter(
target: Point, target: Point,
@ -462,11 +452,6 @@ export abstract class Mouse {
* Dispatches a `dragover` event. * Dispatches a `dragover` event.
* @param target - point for emitting `dragover` event * @param target - point for emitting `dragover` event
* @param data - drag data containing items and operations mask * @param data - drag data containing items and operations mask
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract dragOver( abstract dragOver(
target: Point, target: Point,
@ -477,11 +462,6 @@ export abstract class Mouse {
* Performs a dragenter, dragover, and drop in sequence. * Performs a dragenter, dragover, and drop in sequence.
* @param target - point to drop on * @param target - point to drop on
* @param data - drag data containing items and operations mask * @param data - drag data containing items and operations mask
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract drop(target: Point, data: Protocol.Input.DragData): Promise<void>; abstract drop(target: Point, data: Protocol.Input.DragData): Promise<void>;
@ -492,11 +472,6 @@ export abstract class Mouse {
* @param options - An object of options. Accepts delay which, * @param options - An object of options. Accepts delay which,
* if specified, is the time to wait between `dragover` and `drop` in milliseconds. * if specified, is the time to wait between `dragover` and `drop` in milliseconds.
* Defaults to 0. * Defaults to 0.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract dragAndDrop( abstract dragAndDrop(
start: Point, start: Point,

View File

@ -420,11 +420,6 @@ export const enum PageEvent {
* page.evaluate(() => window.open('https://example.com')), * page.evaluate(() => window.open('https://example.com')),
* ]); * ]);
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
Popup = 'popup', Popup = 'popup',
/** /**
@ -468,22 +463,12 @@ export const enum PageEvent {
* Emitted when a dedicated * Emitted when a dedicated
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker} * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}
* is spawned by the page. * is spawned by the page.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
WorkerCreated = 'workercreated', WorkerCreated = 'workercreated',
/** /**
* Emitted when a dedicated * Emitted when a dedicated
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker} * {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}
* is destroyed by the page. * is destroyed by the page.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
WorkerDestroyed = 'workerdestroyed', WorkerDestroyed = 'workerdestroyed',
} }
@ -624,11 +609,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
/** /**
* `true` if the service worker are being bypassed, `false` otherwise. * `true` if the service worker are being bypassed, `false` otherwise.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract isServiceWorkerBypassed(): boolean; abstract isServiceWorkerBypassed(): boolean;
@ -638,23 +618,11 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @deprecated We no longer support intercepting drag payloads. Use the new * @deprecated We no longer support intercepting drag payloads. Use the new
* drag APIs found on {@link ElementHandle} to drag (or just use the * drag APIs found on {@link ElementHandle} to drag (or just use the
* {@link Page.mouse}). * {@link Page.mouse}).
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract isDragInterceptionEnabled(): boolean; abstract isDragInterceptionEnabled(): boolean;
/** /**
* `true` if the page has JavaScript enabled, `false` otherwise. * `true` if the page has JavaScript enabled, `false` otherwise.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract isJavaScriptEnabled(): boolean; abstract isJavaScriptEnabled(): boolean;
@ -740,11 +708,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* ]); * ]);
* await fileChooser.accept(['/tmp/myfile.pdf']); * await fileChooser.accept(['/tmp/myfile.pdf']);
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract waitForFileChooser( abstract waitForFileChooser(
options?: WaitTimeoutOptions options?: WaitTimeoutOptions
@ -762,13 +725,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* ```ts * ```ts
* await page.setGeolocation({latitude: 59.95, longitude: 30.31667}); * await page.setGeolocation({latitude: 59.95, longitude: 30.31667});
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract setGeolocation(options: GeolocationOptions): Promise<void>; abstract setGeolocation(options: GeolocationOptions): Promise<void>;
@ -797,13 +753,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
/** /**
* Creates a Chrome Devtools Protocol session attached to the page. * Creates a Chrome Devtools Protocol session attached to the page.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract createCDPSession(): Promise<CDPSession>; abstract createCDPSession(): Promise<CDPSession>;
@ -844,11 +793,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* *
* @remarks * @remarks
* This does not contain ServiceWorkers * This does not contain ServiceWorkers
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract workers(): WebWorker[]; abstract workers(): WebWorker[];
@ -887,11 +831,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* ``` * ```
* *
* @param value - Whether to enable request interception. * @param value - Whether to enable request interception.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract setRequestInterception(value: boolean): Promise<void>; abstract setRequestInterception(value: boolean): Promise<void>;
@ -899,11 +838,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* Toggles ignoring of service worker for each request. * Toggles ignoring of service worker for each request.
* *
* @param bypass - Whether to bypass service worker and load from network. * @param bypass - Whether to bypass service worker and load from network.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract setBypassServiceWorker(bypass: boolean): Promise<void>; abstract setBypassServiceWorker(bypass: boolean): Promise<void>;
@ -913,11 +847,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @deprecated We no longer support intercepting drag payloads. Use the new * @deprecated We no longer support intercepting drag payloads. Use the new
* drag APIs found on {@link ElementHandle} to drag (or just use the * drag APIs found on {@link ElementHandle} to drag (or just use the
* {@link Page.mouse}). * {@link Page.mouse}).
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract setDragInterception(enabled: boolean): Promise<void>; abstract setDragInterception(enabled: boolean): Promise<void>;
@ -927,11 +856,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* It does not change the parameters used in {@link Page.emulateNetworkConditions} * It does not change the parameters used in {@link Page.emulateNetworkConditions}
* *
* @param enabled - When `true`, enables offline mode for the page. * @param enabled - When `true`, enables offline mode for the page.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract setOfflineMode(enabled: boolean): Promise<void>; abstract setOfflineMode(enabled: boolean): Promise<void>;
@ -961,11 +885,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* *
* @param networkConditions - Passing `null` disables network condition * @param networkConditions - Passing `null` disables network condition
* emulation. * emulation.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract emulateNetworkConditions( abstract emulateNetworkConditions(
networkConditions: NetworkConditions | null networkConditions: NetworkConditions | null
@ -1049,15 +968,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @param selector - A `selector` to query page for * @param selector - A `selector` to query page for
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector} * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector}
* to query page for. * to query page for.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support
*
* - ARIA selector not supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
async $<Selector extends string>( async $<Selector extends string>(
selector: Selector selector: Selector
@ -1068,18 +978,12 @@ export abstract class Page extends EventEmitter<PageEvents> {
/** /**
* The method runs `document.querySelectorAll` within the page. If no elements * The method runs `document.querySelectorAll` within the page. If no elements
* match the selector, the return value resolves to `[]`. * match the selector, the return value resolves to `[]`.
* @remarks *
* Shortcut for {@link Frame.$$ | Page.mainFrame().$$(selector) }.
* @param selector - A `selector` to query page for * @param selector - A `selector` to query page for
* *
* @privateRemarks BiDi * @remarks
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
* *
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support * Shortcut for {@link Frame.$$ | Page.mainFrame().$$(selector) }.
*
* - ARIA selector not supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
async $$<Selector extends string>( async $$<Selector extends string>(
selector: Selector selector: Selector
@ -1180,13 +1084,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @param prototypeHandle - a handle to the object prototype. * @param prototypeHandle - a handle to the object prototype.
* @returns Promise which resolves to a handle to an array of objects with * @returns Promise which resolves to a handle to an array of objects with
* this prototype. * this prototype.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract queryObjects<Prototype>( abstract queryObjects<Prototype>(
prototypeHandle: JSHandle<Prototype> prototypeHandle: JSHandle<Prototype>
@ -1253,15 +1150,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @returns The result of calling `pageFunction`. If it returns an element it * @returns The result of calling `pageFunction`. If it returns an element it
* is wrapped in an {@link ElementHandle}, else the raw value itself is * is wrapped in an {@link ElementHandle}, else the raw value itself is
* returned. * returned.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support
*
* - ARIA selector not supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
async $eval< async $eval<
Selector extends string, Selector extends string,
@ -1340,15 +1228,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @returns The result of calling `pageFunction`. If it returns an element it * @returns The result of calling `pageFunction`. If it returns an element it
* is wrapped in an {@link ElementHandle}, else the raw value itself is * is wrapped in an {@link ElementHandle}, else the raw value itself is
* returned. * returned.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support
*
* - ARIA selector not supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
async $$eval< async $$eval<
Selector extends string, Selector extends string,
@ -1383,20 +1262,9 @@ export abstract class Page extends EventEmitter<PageEvents> {
/** /**
* If no URLs are specified, this method returns cookies for the current page * If no URLs are specified, this method returns cookies for the current page
* URL. If URLs are specified, only cookies for those URLs are returned. * URL. If URLs are specified, only cookies for those URLs are returned.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract cookies(...urls: string[]): Promise<Protocol.Network.Cookie[]>; abstract cookies(...urls: string[]): Promise<Protocol.Network.Cookie[]>;
/**
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/
abstract deleteCookie( abstract deleteCookie(
...cookies: Protocol.Network.DeleteCookiesRequest[] ...cookies: Protocol.Network.DeleteCookiesRequest[]
): Promise<void>; ): Promise<void>;
@ -1407,11 +1275,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* ```ts * ```ts
* await page.setCookie(cookieObject1, cookieObject2); * await page.setCookie(cookieObject1, cookieObject2);
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract setCookie(...cookies: Protocol.Network.CookieParam[]): Promise<void>; abstract setCookie(...cookies: Protocol.Network.CookieParam[]): Promise<void>;
@ -1540,11 +1403,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* *
* @remarks * @remarks
* To disable authentication, pass `null`. * To disable authentication, pass `null`.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract authenticate(credentials: Credentials): Promise<void>; abstract authenticate(credentials: Credentials): Promise<void>;
@ -1567,11 +1425,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* *
* @param headers - An object containing additional HTTP headers to be sent * @param headers - An object containing additional HTTP headers to be sent
* with every request. All header values must be strings. * with every request. All header values must be strings.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract setExtraHTTPHeaders(headers: Record<string, string>): Promise<void>; abstract setExtraHTTPHeaders(headers: Record<string, string>): Promise<void>;
@ -1580,11 +1433,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @param userAgentData - Specific user agent client hint data to use in this * @param userAgentData - Specific user agent client hint data to use in this
* page * page
* @returns Promise which resolves when the user agent is set. * @returns Promise which resolves when the user agent is set.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract setUserAgent( abstract setUserAgent(
userAgent: string, userAgent: string,
@ -1626,18 +1474,15 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @remarks * @remarks
* All timestamps are in monotonic time: monotonically increasing time * All timestamps are in monotonic time: monotonically increasing time
* in seconds since an arbitrary point in the past. * in seconds since an arbitrary point in the past.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract metrics(): Promise<Metrics>; abstract metrics(): Promise<Metrics>;
/** /**
* The page's URL. * The page's URL.
* @remarks Shortcut for *
* {@link Frame.url | page.mainFrame().url()}. * @remarks
*
* Shortcut for {@link Frame.url | page.mainFrame().url()}.
*/ */
url(): string { url(): string {
return this.mainFrame().url(); return this.mainFrame().url();
@ -1655,7 +1500,9 @@ export abstract class Page extends EventEmitter<PageEvents> {
* *
* @param html - HTML markup to assign to the page. * @param html - HTML markup to assign to the page.
* @param options - Parameters that has some properties. * @param options - Parameters that has some properties.
*
* @remarks * @remarks
*
* The parameter `options` might have the following options. * The parameter `options` might have the following options.
* *
* - `timeout` : Maximum time in milliseconds for resources to load, defaults * - `timeout` : Maximum time in milliseconds for resources to load, defaults
@ -1684,6 +1531,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
* Navigates the page to the given `url`. * Navigates the page to the given `url`.
* *
* @remarks * @remarks
*
* Navigation to `about:blank` or navigation to the same URL with a different * Navigation to `about:blank` or navigation to the same URL with a different
* hash will succeed and return `null`. * hash will succeed and return `null`.
* *
@ -1744,6 +1592,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
* ``` * ```
* *
* @remarks * @remarks
*
* Usage of the * Usage of the
* {@link https://developer.mozilla.org/en-US/docs/Web/API/History_API | History API} * {@link https://developer.mozilla.org/en-US/docs/Web/API/History_API | History API}
* to change the URL is considered a navigation. * to change the URL is considered a navigation.
@ -1934,11 +1783,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* more than 0 network connections for at least `500` ms.<br/> * more than 0 network connections for at least `500` ms.<br/>
* - `networkidle2` : consider navigation to be finished when there are no * - `networkidle2` : consider navigation to be finished when there are no
* more than 2 network connections for at least `500` ms. * more than 2 network connections for at least `500` ms.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract goBack(options?: WaitForOptions): Promise<HTTPResponse | null>; abstract goBack(options?: WaitForOptions): Promise<HTTPResponse | null>;
@ -1967,11 +1811,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* more than 0 network connections for at least `500` ms.<br/> * more than 0 network connections for at least `500` ms.<br/>
* - `networkidle2` : consider navigation to be finished when there are no * - `networkidle2` : consider navigation to be finished when there are no
* more than 2 network connections for at least `500` ms. * more than 2 network connections for at least `500` ms.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract goForward(options?: WaitForOptions): Promise<HTTPResponse | null>; abstract goForward(options?: WaitForOptions): Promise<HTTPResponse | null>;
@ -1990,7 +1829,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* This method is a shortcut for calling two methods: * This method is a shortcut for calling two methods:
* {@link Page.setUserAgent} and {@link Page.setViewport}. * {@link Page.setUserAgent} and {@link Page.setViewport}.
* *
* @remarks
* This method will resize the page. A lot of websites don't expect phones to * This method will resize the page. A lot of websites don't expect phones to
* change size, so you should emulate before navigating to the page. * change size, so you should emulate before navigating to the page.
* *
@ -2009,11 +1847,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* await browser.close(); * await browser.close();
* })(); * })();
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
async emulate(device: Device): Promise<void> { async emulate(device: Device): Promise<void> {
await Promise.all([ await Promise.all([
@ -2027,13 +1860,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @remarks * @remarks
* NOTE: changing this value won't affect scripts that have already been run. * NOTE: changing this value won't affect scripts that have already been run.
* It will take full effect on the next navigation. * It will take full effect on the next navigation.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract setJavaScriptEnabled(enabled: boolean): Promise<void>; abstract setJavaScriptEnabled(enabled: boolean): Promise<void>;
@ -2044,13 +1870,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* NOTE: CSP bypassing happens at the moment of CSP initialization rather than * NOTE: CSP bypassing happens at the moment of CSP initialization rather than
* evaluation. Usually, this means that `page.setBypassCSP` should be called * evaluation. Usually, this means that `page.setBypassCSP` should be called
* before navigating to the domain. * before navigating to the domain.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract setBypassCSP(enabled: boolean): Promise<void>; abstract setBypassCSP(enabled: boolean): Promise<void>;
@ -2078,26 +1897,12 @@ export abstract class Page extends EventEmitter<PageEvents> {
* await page.evaluate(() => matchMedia('print').matches); * await page.evaluate(() => matchMedia('print').matches);
* // → false * // → false
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract emulateMediaType(type?: string): Promise<void>; abstract emulateMediaType(type?: string): Promise<void>;
/** /**
* Enables CPU throttling to emulate slow CPUs. * Enables CPU throttling to emulate slow CPUs.
* @param factor - slowdown factor (1 is no throttle, 2 is 2x slowdown, etc). * @param factor - slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract emulateCPUThrottling(factor: number | null): Promise<void>; abstract emulateCPUThrottling(factor: number | null): Promise<void>;
@ -2161,13 +1966,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* await page.evaluate(() => matchMedia('(color-gamut: rec2020)').matches); * await page.evaluate(() => matchMedia('(color-gamut: rec2020)').matches);
* // → false * // → false
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract emulateMediaFeatures(features?: MediaFeature[]): Promise<void>; abstract emulateMediaFeatures(features?: MediaFeature[]): Promise<void>;
@ -2176,13 +1974,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* {@link https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt | ICUs metaZones.txt} * {@link https://source.chromium.org/chromium/chromium/deps/icu.git/+/faee8bc70570192d82d2978a71e2a615788597d1:source/data/misc/metaZones.txt | ICUs metaZones.txt}
* for a list of supported timezone IDs. Passing * for a list of supported timezone IDs. Passing
* `null` disables timezone emulation. * `null` disables timezone emulation.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract emulateTimezone(timezoneId?: string): Promise<void>; abstract emulateTimezone(timezoneId?: string): Promise<void>;
@ -2204,13 +1995,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* ``` * ```
* *
* @param overrides - Mock idle state. If not set, clears idle overrides * @param overrides - Mock idle state. If not set, clears idle overrides
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract emulateIdleState(overrides?: { abstract emulateIdleState(overrides?: {
isUserActive: boolean; isUserActive: boolean;
@ -2244,13 +2028,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* ``` * ```
* *
* @param type - the type of deficiency to simulate, or `'none'` to reset. * @param type - the type of deficiency to simulate, or `'none'` to reset.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract emulateVisionDeficiency( abstract emulateVisionDeficiency(
type?: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest['type'] type?: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest['type']
@ -2279,15 +2056,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @remarks * @remarks
* NOTE: in certain cases, setting viewport will reload the page in order to * NOTE: in certain cases, setting viewport will reload the page in order to
* set the isMobile or hasTouch properties. * set the isMobile or hasTouch properties.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support
*
* #TODO: List unsupported?
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract setViewport(viewport: Viewport): Promise<void>; abstract setViewport(viewport: Viewport): Promise<void>;
@ -2416,13 +2184,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* default, caching is enabled. * default, caching is enabled.
* @param enabled - sets the `enabled` state of cache * @param enabled - sets the `enabled` state of cache
* @defaultValue `true` * @defaultValue `true`
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract setCacheEnabled(enabled?: boolean): Promise<void>; abstract setCacheEnabled(enabled?: boolean): Promise<void>;
@ -2445,13 +2206,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
/** /**
* Captures a screencast of this {@link Page | page}. * Captures a screencast of this {@link Page | page}.
* *
* @remarks
*
* All recordings will be {@link https://www.webmproject.org/ | WebM} format using
* the {@link https://www.webmproject.org/vp9/ | VP9} video codec. The FPS is 30.
*
* You must have {@link https://ffmpeg.org/ | ffmpeg} installed on your system.
*
* @example * @example
* Recording a {@link Page | page}: * Recording a {@link Page | page}:
* *
@ -2482,12 +2236,12 @@ export abstract class Page extends EventEmitter<PageEvents> {
* *
* @experimental * @experimental
* *
* @privateRemarks BiDi * @remarks
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
* *
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported * All recordings will be {@link https://www.webmproject.org/ | WebM} format using
* the {@link https://www.webmproject.org/vp9/ | VP9} video codec. The FPS is 30.
* *
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported * You must have {@link https://ffmpeg.org/ | ffmpeg} installed on your system.
*/ */
async screencast( async screencast(
options: Readonly<ScreencastOptions> = {} options: Readonly<ScreencastOptions> = {}
@ -2629,15 +2383,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* Captures a screenshot of this {@link Page | page}. * Captures a screenshot of this {@link Page | page}.
* *
* @param options - Configures screenshot behavior. * @param options - Configures screenshot behavior.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support
*
* #TODO: List unsupported?
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
async screenshot( async screenshot(
options: Readonly<ScreenshotOptions> & {encoding: 'base64'} options: Readonly<ScreenshotOptions> & {encoding: 'base64'}
@ -2789,6 +2534,9 @@ export abstract class Page extends EventEmitter<PageEvents> {
/** /**
* Generates a PDF of the page with the `print` CSS media type. * Generates a PDF of the page with the `print` CSS media type.
*
* @param options - options for generating the PDF.
*
* @remarks * @remarks
* *
* To generate a PDF with the `screen` media type, call * To generate a PDF with the `screen` media type, call
@ -2799,17 +2547,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* Use the * Use the
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust | `-webkit-print-color-adjust`} * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust | `-webkit-print-color-adjust`}
* property to force rendering of exact colors. * property to force rendering of exact colors.
*
* @param options - options for generating the PDF.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support
*
* #TODO: List unsupported?
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*/ */
abstract createPDFStream(options?: PDFOptions): Promise<Readable>; abstract createPDFStream(options?: PDFOptions): Promise<Readable>;
@ -2822,6 +2559,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
* The page's title * The page's title
* *
* @remarks * @remarks
*
* Shortcut for {@link Frame.title | page.mainFrame().title()}. * Shortcut for {@link Frame.title | page.mainFrame().title()}.
*/ */
async title(): Promise<string> { async title(): Promise<string> {
@ -2846,7 +2584,10 @@ export abstract class Page extends EventEmitter<PageEvents> {
* needed, and then uses {@link Page | Page.mouse} to click in the center of the * needed, and then uses {@link Page | Page.mouse} to click in the center of the
* element. If there's no element matching `selector`, the method throws an * element. If there's no element matching `selector`, the method throws an
* error. * error.
* @remarks Bear in mind that if `click()` triggers a navigation event and *
* @remarks
*
* Bear in mind that if `click()` triggers a navigation event and
* there's a separate `page.waitForNavigation()` promise to be resolved, you * there's a separate `page.waitForNavigation()` promise to be resolved, you
* may end up with a race condition that yields unexpected results. The * may end up with a race condition that yields unexpected results. The
* correct pattern for click and wait for navigation is the following: * correct pattern for click and wait for navigation is the following:
@ -2880,7 +2621,9 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @returns Promise which resolves when the element matching selector is * @returns Promise which resolves when the element matching selector is
* successfully focused. The promise will be rejected if there is no element * successfully focused. The promise will be rejected if there is no element
* matching selector. * matching selector.
*
* @remarks * @remarks
*
* Shortcut for {@link Frame.focus | page.mainFrame().focus(selector)}. * Shortcut for {@link Frame.focus | page.mainFrame().focus(selector)}.
*/ */
focus(selector: string): Promise<void> { focus(selector: string): Promise<void> {
@ -2899,7 +2642,9 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @returns Promise which resolves when the element matching `selector` is * @returns Promise which resolves when the element matching `selector` is
* successfully hovered. Promise gets rejected if there's no element matching * successfully hovered. Promise gets rejected if there's no element matching
* `selector`. * `selector`.
*
* @remarks * @remarks
*
* Shortcut for {@link Page.hover | page.mainFrame().hover(selector)}. * Shortcut for {@link Page.hover | page.mainFrame().hover(selector)}.
*/ */
hover(selector: string): Promise<void> { hover(selector: string): Promise<void> {
@ -2927,6 +2672,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @returns * @returns
* *
* @remarks * @remarks
*
* Shortcut for {@link Frame.select | page.mainFrame().select()} * Shortcut for {@link Frame.select | page.mainFrame().select()}
*/ */
select(selector: string, ...values: string[]): Promise<string[]> { select(selector: string, ...values: string[]): Promise<string[]> {
@ -2942,13 +2688,10 @@ export abstract class Page extends EventEmitter<PageEvents> {
* {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | Selector} * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | Selector}
* to search for element to tap. If there are multiple elements satisfying the * to search for element to tap. If there are multiple elements satisfying the
* selector, the first will be tapped. * selector, the first will be tapped.
*
* @remarks * @remarks
*
* Shortcut for {@link Frame.tap | page.mainFrame().tap(selector)}. * Shortcut for {@link Frame.tap | page.mainFrame().tap(selector)}.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
tap(selector: string): Promise<void> { tap(selector: string): Promise<void> {
return this.mainFrame().tap(selector); return this.mainFrame().tap(selector);
@ -2976,7 +2719,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @param options - have property `delay` which is the Time to wait between * @param options - have property `delay` which is the Time to wait between
* key presses in milliseconds. Defaults to `0`. * key presses in milliseconds. Defaults to `0`.
* @returns * @returns
* @remarks
*/ */
type( type(
selector: string, selector: string,
@ -2992,6 +2734,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
* Causes your script to wait for the given number of milliseconds. * Causes your script to wait for the given number of milliseconds.
* *
* @remarks * @remarks
*
* It's generally recommended to not wait for a number of seconds, but instead * It's generally recommended to not wait for a number of seconds, but instead
* use {@link Frame.waitForSelector}, {@link Frame.waitForXPath} or * use {@link Frame.waitForSelector}, {@link Frame.waitForXPath} or
* {@link Frame.waitForFunction} to wait for exactly the conditions you want. * {@link Frame.waitForFunction} to wait for exactly the conditions you want.
@ -3046,6 +2789,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
* @returns Promise which resolves when element specified by selector string * @returns Promise which resolves when element specified by selector string
* is added to DOM. Resolves to `null` if waiting for hidden: `true` and * is added to DOM. Resolves to `null` if waiting for hidden: `true` and
* selector is not found in DOM. * selector is not found in DOM.
*
* @remarks * @remarks
* The optional Parameter in Arguments `options` are: * The optional Parameter in Arguments `options` are:
* *
@ -3060,13 +2804,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* - `timeout`: maximum time to wait for in milliseconds. Defaults to `30000` * - `timeout`: maximum time to wait for in milliseconds. Defaults to `30000`
* (30 seconds). Pass `0` to disable timeout. The default value can be changed * (30 seconds). Pass `0` to disable timeout. The default value can be changed
* by using the {@link Page.setDefaultTimeout} method. * by using the {@link Page.setDefaultTimeout} method.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support
*
* - ARIA selector not supported
*/ */
async waitForSelector<Selector extends string>( async waitForSelector<Selector extends string>(
selector: Selector, selector: Selector,
@ -3223,11 +2960,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
* await devicePrompt.waitForDevice(({name}) => name.includes('My Device')) * await devicePrompt.waitForDevice(({name}) => name.includes('My Device'))
* ); * );
* ``` * ```
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract waitForDevicePrompt( abstract waitForDevicePrompt(
options?: WaitTimeoutOptions options?: WaitTimeoutOptions

View File

@ -70,11 +70,6 @@ export abstract class Target {
/** /**
* Creates a Chrome Devtools Protocol session attached to the target. * Creates a Chrome Devtools Protocol session attached to the target.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract createCDPSession(): Promise<CDPSession>; abstract createCDPSession(): Promise<CDPSession>;
@ -99,11 +94,6 @@ export abstract class Target {
/** /**
* Get the target that opened this target. Top-level targets return `null`. * Get the target that opened this target. Top-level targets return `null`.
*
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*/ */
abstract opener(): Target | undefined; abstract opener(): Target | undefined;
} }

View File

@ -128,13 +128,6 @@ export interface SnapshotOptions {
* By default, Puppeteer tries to approximate this filtering, exposing only * By default, Puppeteer tries to approximate this filtering, exposing only
* the "interesting" nodes of the tree. * the "interesting" nodes of the tree.
* *
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*
* @public * @public
*/ */
export class Accessibility { export class Accessibility {

View File

@ -123,13 +123,6 @@ export interface CSSCoverageOptions {
* console.log(`Bytes used: ${(usedBytes / totalBytes) * 100}%`); * console.log(`Bytes used: ${(usedBytes / totalBytes) * 100}%`);
* ``` * ```
* *
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*
* @public * @public
*/ */
export class Coverage { export class Coverage {

View File

@ -45,13 +45,6 @@ export interface TracingOptions {
* await page.tracing.stop(); * await page.tracing.stop();
* ``` * ```
* *
* @privateRemarks BiDi
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported
*
* {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi+}: Supported
*
* @public * @public
*/ */
export class Tracing { export class Tracing {

View File

@ -23,7 +23,7 @@ import type {ConnectionTransport} from './ConnectionTransport.js';
import type {Viewport} from './Viewport.js'; import type {Viewport} from './Viewport.js';
/** /**
* @internal * @public
*/ */
export type ProtocolType = 'cdp' | 'webDriverBiDi'; export type ProtocolType = 'cdp' | 'webDriverBiDi';
@ -57,9 +57,10 @@ export interface BrowserConnectOptions {
* @internal * @internal
*/ */
_isPageTarget?: IsPageTargetCallback; _isPageTarget?: IsPageTargetCallback;
/** /**
* @defaultValue 'cdp' * @defaultValue 'cdp'
* @internal * @public
*/ */
protocol?: ProtocolType; protocol?: ProtocolType;
/** /**

View File

@ -95,8 +95,8 @@ export abstract class ProductLauncher {
slowMo = 0, slowMo = 0,
timeout = 30000, timeout = 30000,
waitForInitialPage = true, waitForInitialPage = true,
protocol,
protocolTimeout, protocolTimeout,
protocol,
} = options; } = options;
const launchArgs = await this.computeLaunchArguments(options); const launchArgs = await this.computeLaunchArguments(options);

View File

@ -39,6 +39,7 @@ module.exports = {
}, },
], ],
}, },
'webdriver-bidi',
'chromium-support', 'chromium-support',
'troubleshooting', 'troubleshooting',
'contributing', 'contributing',

View File

@ -32,7 +32,8 @@ non-standard DevTools Protocol used by Chrome).
The goals of the project are: The goals of the project are:
- Provide a slim, canonical library that highlights the capabilities of the - Provide a slim, canonical library that highlights the capabilities of the
[DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/). [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) and
[WebDriver BiDi](https://w3c.github.io/webdriver-bidi/).
- Provide a reference implementation for similar testing libraries. Eventually, - Provide a reference implementation for similar testing libraries. Eventually,
these other frameworks could adopt Puppeteer as their foundational layer. these other frameworks could adopt Puppeteer as their foundational layer.
- Grow the adoption of headless/automated browser testing. - Grow the adoption of headless/automated browser testing.