mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: mark where APIs don't work for BiDi (#11396)
This commit is contained in:
parent
b58ba6b07c
commit
7c499cb0b5
@ -399,6 +399,9 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
|
||||
*
|
||||
* {@link Page | Pages} can override the user agent with
|
||||
* {@link Page.setUserAgent}.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract userAgent(): Promise<string>;
|
||||
|
||||
|
@ -164,6 +164,9 @@ export abstract class BrowserContext extends EventEmitter<BrowserContextEvents>
|
||||
* "https://example.com".
|
||||
* @param permissions - An array of permissions to grant. All permissions that
|
||||
* are not listed here will be automatically denied.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract overridePermissions(
|
||||
origin: string,
|
||||
@ -183,6 +186,9 @@ export abstract class BrowserContext extends EventEmitter<BrowserContextEvents>
|
||||
* // do stuff ..
|
||||
* context.clearPermissionOverrides();
|
||||
* ```
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract clearPermissionOverrides(): Promise<void>;
|
||||
|
||||
|
@ -963,6 +963,8 @@ export abstract class ElementHandle<
|
||||
* For locals script connecting to remote chrome environments, paths must be
|
||||
* absolute.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract uploadFile(
|
||||
this: ElementHandle<HTMLInputElement>,
|
||||
|
@ -311,6 +311,9 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
|
||||
/**
|
||||
* Is `true` if the frame is an out-of-process (OOP) frame. Otherwise,
|
||||
* `false`.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract isOOPFrame(): boolean;
|
||||
|
||||
@ -1196,6 +1199,9 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
|
||||
* );
|
||||
* ```
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
abstract waitForDevicePrompt(
|
||||
|
@ -130,6 +130,9 @@ export abstract class HTTPRequest {
|
||||
* Warning! Using this client can break Puppeteer. Use with caution.
|
||||
*
|
||||
* @experimental
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract get client(): CDPSession;
|
||||
|
||||
@ -147,17 +150,26 @@ export abstract class HTTPRequest {
|
||||
* The `ContinueRequestOverrides` that will be used
|
||||
* if the interception is allowed to continue (ie, `abort()` and
|
||||
* `respond()` aren't called).
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract continueRequestOverrides(): ContinueRequestOverrides;
|
||||
|
||||
/**
|
||||
* The `ResponseForRequest` that gets used if the
|
||||
* interception is allowed to respond (ie, `abort()` is not called).
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract responseForRequest(): Partial<ResponseForRequest> | null;
|
||||
|
||||
/**
|
||||
* The most recent reason for aborting the request
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract abortErrorReason(): Protocol.Network.ErrorReason | null;
|
||||
|
||||
@ -171,12 +183,18 @@ export abstract class HTTPRequest {
|
||||
*
|
||||
* InterceptResolutionAction is one of: `abort`, `respond`, `continue`,
|
||||
* `disabled`, `none`, or `already-handled`.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract interceptResolutionState(): InterceptResolutionState;
|
||||
|
||||
/**
|
||||
* Is `true` if the intercept resolution has already been handled,
|
||||
* `false` otherwise.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract isInterceptResolutionHandled(): boolean;
|
||||
|
||||
@ -193,6 +211,9 @@ export abstract class HTTPRequest {
|
||||
/**
|
||||
* Awaits pending interception handlers and then decides how to fulfill
|
||||
* the request interception.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract finalizeInterceptions(): Promise<void>;
|
||||
|
||||
@ -288,6 +309,9 @@ export abstract class HTTPRequest {
|
||||
* return an object with `errorText` containing a human-readable error
|
||||
* message, e.g. `net::ERR_FAILED`. It is not guaranteed that there will be
|
||||
* failure text if the request fails.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract failure(): {errorText: string} | null;
|
||||
|
||||
@ -319,6 +343,9 @@ export abstract class HTTPRequest {
|
||||
* @param priority - If provided, intercept is resolved using
|
||||
* cooperative handling rules. Otherwise, intercept is resolved
|
||||
* immediately.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract continue(
|
||||
overrides?: ContinueRequestOverrides,
|
||||
@ -356,6 +383,9 @@ export abstract class HTTPRequest {
|
||||
* @param priority - If provided, intercept is resolved using
|
||||
* cooperative handling rules. Otherwise, intercept is resolved
|
||||
* immediately.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract respond(
|
||||
response: Partial<ResponseForRequest>,
|
||||
@ -374,6 +404,9 @@ export abstract class HTTPRequest {
|
||||
* @param priority - If provided, intercept is resolved using
|
||||
* cooperative handling rules. Otherwise, intercept is resolved
|
||||
* immediately.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract abort(errorCode?: ErrorCode, priority?: number): Promise<void>;
|
||||
}
|
||||
|
@ -81,6 +81,9 @@ export abstract class HTTPResponse {
|
||||
/**
|
||||
* {@link SecurityDetails} if the response was received over the
|
||||
* secure connection, or `null` otherwise.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract securityDetails(): SecurityDetails | null;
|
||||
|
||||
@ -91,6 +94,9 @@ export abstract class HTTPResponse {
|
||||
|
||||
/**
|
||||
* Promise which resolves to a buffer with response body.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract buffer(): Promise<Buffer>;
|
||||
|
||||
|
@ -435,6 +435,9 @@ export abstract class Mouse {
|
||||
* Dispatches a `drag` event.
|
||||
* @param start - starting point for drag
|
||||
* @param target - point to drag to
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract drag(start: Point, target: Point): Promise<Protocol.Input.DragData>;
|
||||
|
||||
@ -442,6 +445,9 @@ export abstract class Mouse {
|
||||
* Dispatches a `dragenter` event.
|
||||
* @param target - point for emitting `dragenter` event
|
||||
* @param data - drag data containing items and operations mask
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract dragEnter(
|
||||
target: Point,
|
||||
@ -452,6 +458,9 @@ export abstract class Mouse {
|
||||
* Dispatches a `dragover` event.
|
||||
* @param target - point for emitting `dragover` event
|
||||
* @param data - drag data containing items and operations mask
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract dragOver(
|
||||
target: Point,
|
||||
@ -462,6 +471,9 @@ export abstract class Mouse {
|
||||
* Performs a dragenter, dragover, and drop in sequence.
|
||||
* @param target - point to drop on
|
||||
* @param data - drag data containing items and operations mask
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract drop(target: Point, data: Protocol.Input.DragData): Promise<void>;
|
||||
|
||||
@ -472,6 +484,9 @@ export abstract class Mouse {
|
||||
* @param options - An object of options. Accepts delay which,
|
||||
* if specified, is the time to wait between `dragover` and `drop` in milliseconds.
|
||||
* Defaults to 0.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract dragAndDrop(
|
||||
start: Point,
|
||||
|
@ -429,6 +429,9 @@ export const enum PageEvent {
|
||||
* page.evaluate(() => window.open('https://example.com')),
|
||||
* ]);
|
||||
* ```
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
Popup = 'popup',
|
||||
/**
|
||||
@ -472,12 +475,18 @@ export const enum PageEvent {
|
||||
* Emitted when a dedicated
|
||||
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}
|
||||
* is spawned by the page.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
WorkerCreated = 'workercreated',
|
||||
/**
|
||||
* Emitted when a dedicated
|
||||
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}
|
||||
* is destroyed by the page.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
WorkerDestroyed = 'workerdestroyed',
|
||||
}
|
||||
@ -718,6 +727,9 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
||||
* ]);
|
||||
* await fileChooser.accept(['/tmp/myfile.pdf']);
|
||||
* ```
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract waitForFileChooser(
|
||||
options?: WaitTimeoutOptions
|
||||
@ -2785,9 +2797,11 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
||||
* {@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
|
||||
* selector, the first will be tapped.
|
||||
* @returns
|
||||
* @remarks
|
||||
* Shortcut for {@link Frame.tap | page.mainFrame().tap(selector)}.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
tap(selector: string): Promise<void> {
|
||||
return this.mainFrame().tap(selector);
|
||||
|
@ -70,6 +70,9 @@ export abstract class Target {
|
||||
|
||||
/**
|
||||
* Creates a Chrome Devtools Protocol session attached to the target.
|
||||
*
|
||||
* @privateRemarks BiDi
|
||||
* Not supported when using protocol `webDriverBiDi`
|
||||
*/
|
||||
abstract createCDPSession(): Promise<CDPSession>;
|
||||
|
||||
@ -94,6 +97,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`
|
||||
*/
|
||||
abstract opener(): Target | undefined;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user