From d54b80fa8065a929229e779393020eeb0919961f Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com> Date: Thu, 16 Nov 2023 21:53:04 +0100 Subject: [PATCH] docs: use link with placeholder (#11405) --- packages/puppeteer-core/src/api/Browser.ts | 4 +- .../puppeteer-core/src/api/BrowserContext.ts | 8 +- .../puppeteer-core/src/api/ElementHandle.ts | 4 +- packages/puppeteer-core/src/api/Frame.ts | 12 +- .../puppeteer-core/src/api/HTTPRequest.ts | 44 ++- .../puppeteer-core/src/api/HTTPResponse.ts | 12 +- packages/puppeteer-core/src/api/Input.ts | 20 +- packages/puppeteer-core/src/api/Page.ts | 262 ++++++++++++++---- packages/puppeteer-core/src/api/Target.ts | 8 +- .../puppeteer-core/src/cdp/Accessibility.ts | 7 +- packages/puppeteer-core/src/cdp/Coverage.ts | 7 +- packages/puppeteer-core/src/cdp/Tracing.ts | 7 +- 12 files changed, 303 insertions(+), 92 deletions(-) diff --git a/packages/puppeteer-core/src/api/Browser.ts b/packages/puppeteer-core/src/api/Browser.ts index fc54766e46e..39ce0e54d59 100644 --- a/packages/puppeteer-core/src/api/Browser.ts +++ b/packages/puppeteer-core/src/api/Browser.ts @@ -402,7 +402,9 @@ export abstract class Browser extends EventEmitter { * {@link Page.setUserAgent}. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract userAgent(): Promise; diff --git a/packages/puppeteer-core/src/api/BrowserContext.ts b/packages/puppeteer-core/src/api/BrowserContext.ts index 733051005fc..eab98a4a700 100644 --- a/packages/puppeteer-core/src/api/BrowserContext.ts +++ b/packages/puppeteer-core/src/api/BrowserContext.ts @@ -166,7 +166,9 @@ export abstract class BrowserContext extends EventEmitter * are not listed here will be automatically denied. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract overridePermissions( origin: string, @@ -188,7 +190,9 @@ export abstract class BrowserContext extends EventEmitter * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract clearPermissionOverrides(): Promise; diff --git a/packages/puppeteer-core/src/api/ElementHandle.ts b/packages/puppeteer-core/src/api/ElementHandle.ts index 1ccb0817043..c2d7afe40c1 100644 --- a/packages/puppeteer-core/src/api/ElementHandle.ts +++ b/packages/puppeteer-core/src/api/ElementHandle.ts @@ -964,7 +964,9 @@ export abstract class ElementHandle< * absolute. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract uploadFile( this: ElementHandle, diff --git a/packages/puppeteer-core/src/api/Frame.ts b/packages/puppeteer-core/src/api/Frame.ts index dc52562aa76..2420f066bc3 100644 --- a/packages/puppeteer-core/src/api/Frame.ts +++ b/packages/puppeteer-core/src/api/Frame.ts @@ -313,7 +313,9 @@ export abstract class Frame extends EventEmitter { * `false`. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract isOOPFrame(): boolean; @@ -352,7 +354,9 @@ export abstract class Frame extends EventEmitter { * calling {@link HTTPResponse.status}. * * @privateRemarks BiDi - * Partial support + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support * * - `referer` not supported * - `referrerPolicy` not supported @@ -1206,7 +1210,9 @@ export abstract class Frame extends EventEmitter { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported * * @internal */ diff --git a/packages/puppeteer-core/src/api/HTTPRequest.ts b/packages/puppeteer-core/src/api/HTTPRequest.ts index 211bfdf585d..2ab50ccd9c0 100644 --- a/packages/puppeteer-core/src/api/HTTPRequest.ts +++ b/packages/puppeteer-core/src/api/HTTPRequest.ts @@ -132,7 +132,9 @@ export abstract class HTTPRequest { * @experimental * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract get client(): CDPSession; @@ -152,7 +154,9 @@ export abstract class HTTPRequest { * `respond()` aren't called). * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract continueRequestOverrides(): ContinueRequestOverrides; @@ -161,7 +165,9 @@ export abstract class HTTPRequest { * interception is allowed to respond (ie, `abort()` is not called). * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract responseForRequest(): Partial | null; @@ -169,7 +175,9 @@ export abstract class HTTPRequest { * The most recent reason for aborting the request * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract abortErrorReason(): Protocol.Network.ErrorReason | null; @@ -185,7 +193,9 @@ export abstract class HTTPRequest { * `disabled`, `none`, or `already-handled`. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract interceptResolutionState(): InterceptResolutionState; @@ -194,7 +204,9 @@ export abstract class HTTPRequest { * `false` otherwise. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract isInterceptResolutionHandled(): boolean; @@ -213,7 +225,9 @@ export abstract class HTTPRequest { * the request interception. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract finalizeInterceptions(): Promise; @@ -311,7 +325,9 @@ export abstract class HTTPRequest { * failure text if the request fails. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract failure(): {errorText: string} | null; @@ -345,7 +361,9 @@ export abstract class HTTPRequest { * immediately. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract continue( overrides?: ContinueRequestOverrides, @@ -385,7 +403,9 @@ export abstract class HTTPRequest { * immediately. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract respond( response: Partial, @@ -406,7 +426,9 @@ export abstract class HTTPRequest { * immediately. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract abort(errorCode?: ErrorCode, priority?: number): Promise; } diff --git a/packages/puppeteer-core/src/api/HTTPResponse.ts b/packages/puppeteer-core/src/api/HTTPResponse.ts index ba3d940b160..c78d53ac555 100644 --- a/packages/puppeteer-core/src/api/HTTPResponse.ts +++ b/packages/puppeteer-core/src/api/HTTPResponse.ts @@ -83,7 +83,9 @@ export abstract class HTTPResponse { * secure connection, or `null` otherwise. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract securityDetails(): SecurityDetails | null; @@ -96,7 +98,9 @@ export abstract class HTTPResponse { * Promise which resolves to a buffer with response body. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract buffer(): Promise; @@ -136,7 +140,9 @@ export abstract class HTTPResponse { * True if the response was served by a service worker. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract fromServiceWorker(): boolean; diff --git a/packages/puppeteer-core/src/api/Input.ts b/packages/puppeteer-core/src/api/Input.ts index c15be017e46..d7a9f634517 100644 --- a/packages/puppeteer-core/src/api/Input.ts +++ b/packages/puppeteer-core/src/api/Input.ts @@ -437,7 +437,9 @@ export abstract class Mouse { * @param target - point to drag to * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract drag(start: Point, target: Point): Promise; @@ -447,7 +449,9 @@ export abstract class Mouse { * @param data - drag data containing items and operations mask * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract dragEnter( target: Point, @@ -460,7 +464,9 @@ export abstract class Mouse { * @param data - drag data containing items and operations mask * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract dragOver( target: Point, @@ -473,7 +479,9 @@ export abstract class Mouse { * @param data - drag data containing items and operations mask * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@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; @@ -486,7 +494,9 @@ export abstract class Mouse { * Defaults to 0. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract dragAndDrop( start: Point, diff --git a/packages/puppeteer-core/src/api/Page.ts b/packages/puppeteer-core/src/api/Page.ts index fc76ee10872..80597989c42 100644 --- a/packages/puppeteer-core/src/api/Page.ts +++ b/packages/puppeteer-core/src/api/Page.ts @@ -422,7 +422,9 @@ export const enum PageEvent { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ Popup = 'popup', /** @@ -468,7 +470,9 @@ export const enum PageEvent { * is spawned by the page. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ WorkerCreated = 'workercreated', /** @@ -477,7 +481,9 @@ export const enum PageEvent { * is destroyed by the page. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ WorkerDestroyed = 'workerdestroyed', } @@ -620,7 +626,9 @@ export abstract class Page extends EventEmitter { * `true` if the service worker are being bypassed, `false` otherwise. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract isServiceWorkerBypassed(): boolean; @@ -632,7 +640,9 @@ export abstract class Page extends EventEmitter { * {@link Page.mouse}). * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract isDragInterceptionEnabled(): boolean; @@ -640,8 +650,11 @@ export abstract class Page extends EventEmitter { * `true` if the page has JavaScript enabled, `false` otherwise. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Support for 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; @@ -729,7 +742,9 @@ export abstract class Page extends EventEmitter { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract waitForFileChooser( options?: WaitTimeoutOptions @@ -749,7 +764,11 @@ export abstract class Page extends EventEmitter { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@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; @@ -780,8 +799,11 @@ export abstract class Page extends EventEmitter { * Creates a Chrome Devtools Protocol session attached to the page. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported By 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; @@ -824,7 +846,9 @@ export abstract class Page extends EventEmitter { * This does not contain ServiceWorkers * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract workers(): WebWorker[]; @@ -865,7 +889,9 @@ export abstract class Page extends EventEmitter { * @param value - Whether to enable request interception. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract setRequestInterception(value: boolean): Promise; @@ -875,7 +901,9 @@ export abstract class Page extends EventEmitter { * @param bypass - Whether to bypass service worker and load from network. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract setBypassServiceWorker(bypass: boolean): Promise; @@ -887,7 +915,9 @@ export abstract class Page extends EventEmitter { * {@link Page.mouse}). * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract setDragInterception(enabled: boolean): Promise; @@ -899,7 +929,9 @@ export abstract class Page extends EventEmitter { * @param enabled - When `true`, enables offline mode for the page. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract setOfflineMode(enabled: boolean): Promise; @@ -931,7 +963,9 @@ export abstract class Page extends EventEmitter { * emulation. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract emulateNetworkConditions( networkConditions: NetworkConditions | null @@ -1015,6 +1049,15 @@ export abstract class Page extends EventEmitter { * @param selector - A `selector` to query page for * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors | selector} * 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: Selector @@ -1028,6 +1071,15 @@ export abstract class Page extends EventEmitter { * @remarks * Shortcut for {@link Frame.$$ | Page.mainFrame().$$(selector) }. * @param selector - A `selector` 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: Selector @@ -1130,8 +1182,11 @@ export abstract class Page extends EventEmitter { * this prototype. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported with 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( prototypeHandle: JSHandle @@ -1198,6 +1253,15 @@ export abstract class Page extends EventEmitter { * @returns The result of calling `pageFunction`. If it returns an element it * is wrapped in an {@link ElementHandle}, else the raw value itself is * 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< Selector extends string, @@ -1276,6 +1340,15 @@ export abstract class Page extends EventEmitter { * @returns The result of calling `pageFunction`. If it returns an element it * is wrapped in an {@link ElementHandle}, else the raw value itself is * 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< Selector extends string, @@ -1312,13 +1385,17 @@ export abstract class Page extends EventEmitter { * URL. If URLs are specified, only cookies for those URLs are returned. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract cookies(...urls: string[]): Promise; /** * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract deleteCookie( ...cookies: Protocol.Network.DeleteCookiesRequest[] @@ -1332,7 +1409,9 @@ export abstract class Page extends EventEmitter { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract setCookie(...cookies: Protocol.Network.CookieParam[]): Promise; @@ -1463,7 +1542,9 @@ export abstract class Page extends EventEmitter { * To disable authentication, pass `null`. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract authenticate(credentials: Credentials): Promise; @@ -1488,7 +1569,9 @@ export abstract class Page extends EventEmitter { * with every request. All header values must be strings. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract setExtraHTTPHeaders(headers: Record): Promise; @@ -1499,7 +1582,9 @@ export abstract class Page extends EventEmitter { * @returns Promise which resolves when the user agent is set. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract setUserAgent( userAgent: string, @@ -1543,7 +1628,9 @@ export abstract class Page extends EventEmitter { * in seconds since an arbitrary point in the past. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract metrics(): Promise; @@ -1849,7 +1936,9 @@ export abstract class Page extends EventEmitter { * more than 2 network connections for at least `500` ms. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract goBack(options?: WaitForOptions): Promise; @@ -1880,7 +1969,9 @@ export abstract class Page extends EventEmitter { * more than 2 network connections for at least `500` ms. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract goForward(options?: WaitForOptions): Promise; @@ -1920,7 +2011,9 @@ export abstract class Page extends EventEmitter { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ async emulate(device: Device): Promise { await Promise.all([ @@ -1936,8 +2029,11 @@ export abstract class Page extends EventEmitter { * It will take full effect on the next navigation. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported 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; @@ -1950,8 +2046,11 @@ export abstract class Page extends EventEmitter { * before navigating to the domain. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported by 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; @@ -1981,8 +2080,11 @@ export abstract class Page extends EventEmitter { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported by 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; @@ -1991,8 +2093,11 @@ export abstract class Page extends EventEmitter { * @param factor - slowdown factor (1 is no throttle, 2 is 2x slowdown, etc). * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported By 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; @@ -2058,8 +2163,11 @@ export abstract class Page extends EventEmitter { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported By 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; @@ -2070,8 +2178,11 @@ export abstract class Page extends EventEmitter { * `null` disables timezone emulation. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported by 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; @@ -2095,8 +2206,11 @@ export abstract class Page extends EventEmitter { * @param overrides - Mock idle state. If not set, clears idle overrides * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported by 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?: { isUserActive: boolean; @@ -2132,8 +2246,11 @@ export abstract class Page extends EventEmitter { * @param type - the type of deficiency to simulate, or `'none'` to reset. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported by 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( type?: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest['type'] @@ -2164,9 +2281,13 @@ export abstract class Page extends EventEmitter { * set the isMobile or hasTouch properties. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Full support by BiDi+ - * Partial support by 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; @@ -2292,8 +2413,11 @@ export abstract class Page extends EventEmitter { * @defaultValue `true` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported by 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; @@ -2354,8 +2478,11 @@ export abstract class Page extends EventEmitter { * @experimental * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Supported by 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 */ async screencast( options: Readonly = {} @@ -2499,7 +2626,13 @@ export abstract class Page extends EventEmitter { * @param options - Configures screenshot behavior. * * @privateRemarks BiDi - * Partial support by 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( options: Readonly & {encoding: 'base64'} @@ -2665,7 +2798,13 @@ export abstract class Page extends EventEmitter { * @param options - options for generating the PDF. * * @privateRemarks BiDi - * Partial support by 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; @@ -2802,7 +2941,9 @@ export abstract class Page extends EventEmitter { * Shortcut for {@link Frame.tap | page.mainFrame().tap(selector)}. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ tap(selector: string): Promise { return this.mainFrame().tap(selector); @@ -2916,8 +3057,11 @@ export abstract class Page extends EventEmitter { * by using the {@link Page.setDefaultTimeout} method. * * @privateRemarks BiDi - * Partial support - - * ARIA selector not supported + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Partial support + * + * - ARIA selector not supported */ async waitForSelector( selector: Selector, @@ -3076,7 +3220,9 @@ export abstract class Page extends EventEmitter { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract waitForDevicePrompt( options?: WaitTimeoutOptions diff --git a/packages/puppeteer-core/src/api/Target.ts b/packages/puppeteer-core/src/api/Target.ts index 69c1e5de020..8d9807b84af 100644 --- a/packages/puppeteer-core/src/api/Target.ts +++ b/packages/puppeteer-core/src/api/Target.ts @@ -72,7 +72,9 @@ export abstract class Target { * Creates a Chrome Devtools Protocol session attached to the target. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract createCDPSession(): Promise; @@ -99,7 +101,9 @@ export abstract class Target { * Get the target that opened this target. Top-level targets return `null`. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | CDP}: Supported + * + * {@link PROTOCOL_GET_STARTED_LINK_TEMPLATE | BiDi}: Unsupported */ abstract opener(): Target | undefined; } diff --git a/packages/puppeteer-core/src/cdp/Accessibility.ts b/packages/puppeteer-core/src/cdp/Accessibility.ts index 8ef6b4114a3..e688a3341d4 100644 --- a/packages/puppeteer-core/src/cdp/Accessibility.ts +++ b/packages/puppeteer-core/src/cdp/Accessibility.ts @@ -129,8 +129,11 @@ export interface SnapshotOptions { * the "interesting" nodes of the tree. * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Support for 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 */ diff --git a/packages/puppeteer-core/src/cdp/Coverage.ts b/packages/puppeteer-core/src/cdp/Coverage.ts index e78d0bc0be4..b08878226f8 100644 --- a/packages/puppeteer-core/src/cdp/Coverage.ts +++ b/packages/puppeteer-core/src/cdp/Coverage.ts @@ -124,8 +124,11 @@ export interface CSSCoverageOptions { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Support for 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 */ diff --git a/packages/puppeteer-core/src/cdp/Tracing.ts b/packages/puppeteer-core/src/cdp/Tracing.ts index c2ff6812a87..9b3f198d3a2 100644 --- a/packages/puppeteer-core/src/cdp/Tracing.ts +++ b/packages/puppeteer-core/src/cdp/Tracing.ts @@ -46,8 +46,11 @@ export interface TracingOptions { * ``` * * @privateRemarks BiDi - * Not supported when using protocol `webDriverBiDi` - * Support for 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 */