@bctrl/sdk 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -29
- package/dist/bctrl.d.ts +22 -36
- package/dist/bctrl.js +40 -75
- package/dist/errors.d.ts +49 -43
- package/dist/errors.js +83 -120
- package/dist/files.d.ts +31 -0
- package/dist/files.js +97 -0
- package/dist/http.d.ts +18 -0
- package/dist/http.js +135 -0
- package/dist/index.d.ts +9 -12
- package/dist/index.js +7 -23
- package/dist/invocations.d.ts +86 -0
- package/dist/invocations.js +159 -0
- package/dist/pagination.d.ts +2 -0
- package/dist/pagination.js +13 -0
- package/dist/runs.d.ts +40 -0
- package/dist/runs.js +105 -0
- package/dist/runtimes.d.ts +69 -0
- package/dist/runtimes.js +202 -0
- package/dist/spaces.d.ts +40 -0
- package/dist/spaces.js +96 -0
- package/dist/types.d.ts +413 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +27 -0
- package/dist/version.js +2 -2
- package/package.json +4 -21
- package/dist/agents/browser-use/index.d.ts +0 -1
- package/dist/agents/browser-use/index.js +0 -9
- package/dist/agents/browser-use/namespace.d.ts +0 -39
- package/dist/agents/browser-use/namespace.js +0 -93
- package/dist/agents/index.d.ts +0 -2
- package/dist/agents/index.js +0 -17
- package/dist/agents/stagehand/core.d.ts +0 -93
- package/dist/agents/stagehand/core.js +0 -144
- package/dist/agents/stagehand/index.d.ts +0 -3
- package/dist/agents/stagehand/index.js +0 -24
- package/dist/agents/stagehand/namespace.d.ts +0 -51
- package/dist/agents/stagehand/namespace.js +0 -65
- package/dist/ai-credentials/client.d.ts +0 -12
- package/dist/ai-credentials/client.js +0 -70
- package/dist/ai-credentials/index.d.ts +0 -1
- package/dist/ai-credentials/index.js +0 -1
- package/dist/base/event-binding.d.ts +0 -7
- package/dist/base/event-binding.js +0 -23
- package/dist/base/types.d.ts +0 -109
- package/dist/base/types.js +0 -4
- package/dist/browser-extensions/client.d.ts +0 -15
- package/dist/browser-extensions/client.js +0 -72
- package/dist/browser-extensions/index.d.ts +0 -2
- package/dist/browser-extensions/index.js +0 -1
- package/dist/browser-profiles/client.d.ts +0 -11
- package/dist/browser-profiles/client.js +0 -63
- package/dist/browser-profiles/index.d.ts +0 -1
- package/dist/browser-profiles/index.js +0 -1
- package/dist/captcha/index.d.ts +0 -1
- package/dist/captcha/index.js +0 -1
- package/dist/captcha/namespace.d.ts +0 -34
- package/dist/captcha/namespace.js +0 -41
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.js +0 -1
- package/dist/client/rpc.d.ts +0 -83
- package/dist/client/rpc.js +0 -354
- package/dist/config.d.ts +0 -5
- package/dist/config.js +0 -28
- package/dist/constants/browser.d.ts +0 -2
- package/dist/constants/browser.js +0 -1
- package/dist/contracts/agent-tools.d.ts +0 -45
- package/dist/contracts/agent-tools.js +0 -31
- package/dist/contracts/automation.d.ts +0 -265
- package/dist/contracts/automation.js +0 -109
- package/dist/contracts/browser-management.d.ts +0 -179
- package/dist/contracts/browser-management.js +0 -95
- package/dist/contracts/browser-use.d.ts +0 -136
- package/dist/contracts/browser-use.js +0 -93
- package/dist/contracts/captcha.d.ts +0 -114
- package/dist/contracts/captcha.js +0 -40
- package/dist/contracts/desktop.d.ts +0 -223
- package/dist/contracts/desktop.js +0 -121
- package/dist/contracts/drivers/playwright.d.ts +0 -2008
- package/dist/contracts/drivers/playwright.js +0 -2033
- package/dist/contracts/drivers/puppeteer.d.ts +0 -1221
- package/dist/contracts/drivers/puppeteer.js +0 -941
- package/dist/contracts/drivers/selenium.d.ts +0 -156
- package/dist/contracts/drivers/selenium.js +0 -61
- package/dist/contracts/drivers/stagehand.d.ts +0 -155
- package/dist/contracts/drivers/stagehand.js +0 -7
- package/dist/contracts/extensions.d.ts +0 -13
- package/dist/contracts/extensions.js +0 -9
- package/dist/contracts/index.d.ts +0 -13
- package/dist/contracts/index.js +0 -13
- package/dist/contracts/public-api.d.ts +0 -360
- package/dist/contracts/public-api.js +0 -17
- package/dist/contracts/runtime.d.ts +0 -81
- package/dist/contracts/runtime.js +0 -16
- package/dist/contracts/stagehand.d.ts +0 -253
- package/dist/contracts/stagehand.js +0 -145
- package/dist/contracts/storage.d.ts +0 -51
- package/dist/contracts/storage.js +0 -56
- package/dist/contracts/vault.d.ts +0 -119
- package/dist/contracts/vault.js +0 -112
- package/dist/contracts/version.d.ts +0 -3
- package/dist/contracts/version.js +0 -16
- package/dist/desktop.d.ts +0 -2
- package/dist/desktop.js +0 -3
- package/dist/drivers/desktop/index.d.ts +0 -65
- package/dist/drivers/desktop/index.js +0 -68
- package/dist/drivers/desktop/session.d.ts +0 -313
- package/dist/drivers/desktop/session.js +0 -432
- package/dist/drivers/playwright/event-emitter.d.ts +0 -160
- package/dist/drivers/playwright/event-emitter.js +0 -297
- package/dist/drivers/playwright/generated/api-request-context.d.ts +0 -137
- package/dist/drivers/playwright/generated/api-request-context.js +0 -154
- package/dist/drivers/playwright/generated/api-response.d.ts +0 -119
- package/dist/drivers/playwright/generated/api-response.js +0 -123
- package/dist/drivers/playwright/generated/browser-context.d.ts +0 -284
- package/dist/drivers/playwright/generated/browser-context.js +0 -458
- package/dist/drivers/playwright/generated/browser.d.ts +0 -120
- package/dist/drivers/playwright/generated/browser.js +0 -151
- package/dist/drivers/playwright/generated/clock.d.ts +0 -80
- package/dist/drivers/playwright/generated/clock.js +0 -94
- package/dist/drivers/playwright/generated/console-message.d.ts +0 -94
- package/dist/drivers/playwright/generated/console-message.js +0 -89
- package/dist/drivers/playwright/generated/coverage.d.ts +0 -57
- package/dist/drivers/playwright/generated/coverage.js +0 -66
- package/dist/drivers/playwright/generated/dialog.d.ts +0 -79
- package/dist/drivers/playwright/generated/dialog.js +0 -80
- package/dist/drivers/playwright/generated/element-handle.d.ts +0 -399
- package/dist/drivers/playwright/generated/element-handle.js +0 -501
- package/dist/drivers/playwright/generated/frame-locator.d.ts +0 -34
- package/dist/drivers/playwright/generated/frame-locator.js +0 -63
- package/dist/drivers/playwright/generated/frame.d.ts +0 -557
- package/dist/drivers/playwright/generated/frame.js +0 -634
- package/dist/drivers/playwright/generated/js-handle.d.ts +0 -72
- package/dist/drivers/playwright/generated/js-handle.js +0 -92
- package/dist/drivers/playwright/generated/keyboard.d.ts +0 -103
- package/dist/drivers/playwright/generated/keyboard.js +0 -113
- package/dist/drivers/playwright/generated/locator.d.ts +0 -795
- package/dist/drivers/playwright/generated/locator.js +0 -974
- package/dist/drivers/playwright/generated/mouse.d.ts +0 -97
- package/dist/drivers/playwright/generated/mouse.js +0 -109
- package/dist/drivers/playwright/generated/page.d.ts +0 -762
- package/dist/drivers/playwright/generated/page.js +0 -988
- package/dist/drivers/playwright/generated/touchscreen.d.ts +0 -34
- package/dist/drivers/playwright/generated/touchscreen.js +0 -37
- package/dist/drivers/playwright/generated/tracing.d.ts +0 -78
- package/dist/drivers/playwright/generated/tracing.js +0 -80
- package/dist/drivers/playwright/generated/worker.d.ts +0 -53
- package/dist/drivers/playwright/generated/worker.js +0 -59
- package/dist/drivers/playwright/index.d.ts +0 -19
- package/dist/drivers/playwright/index.js +0 -20
- package/dist/drivers/playwright/remote-base.d.ts +0 -62
- package/dist/drivers/playwright/remote-base.js +0 -86
- package/dist/drivers/playwright/types.d.ts +0 -148
- package/dist/drivers/playwright/types.js +0 -8
- package/dist/drivers/puppeteer/errors.d.ts +0 -50
- package/dist/drivers/puppeteer/errors.js +0 -71
- package/dist/drivers/puppeteer/event-emitter.d.ts +0 -145
- package/dist/drivers/puppeteer/event-emitter.js +0 -259
- package/dist/drivers/puppeteer/generated/accessibility.d.ts +0 -77
- package/dist/drivers/puppeteer/generated/accessibility.js +0 -74
- package/dist/drivers/puppeteer/generated/browser-context.d.ts +0 -116
- package/dist/drivers/puppeteer/generated/browser-context.js +0 -168
- package/dist/drivers/puppeteer/generated/browser.d.ts +0 -169
- package/dist/drivers/puppeteer/generated/browser.js +0 -246
- package/dist/drivers/puppeteer/generated/console-message.d.ts +0 -54
- package/dist/drivers/puppeteer/generated/console-message.js +0 -69
- package/dist/drivers/puppeteer/generated/coverage.d.ts +0 -49
- package/dist/drivers/puppeteer/generated/coverage.js +0 -57
- package/dist/drivers/puppeteer/generated/dialog.d.ts +0 -46
- package/dist/drivers/puppeteer/generated/dialog.js +0 -60
- package/dist/drivers/puppeteer/generated/element-handle.d.ts +0 -261
- package/dist/drivers/puppeteer/generated/element-handle.js +0 -341
- package/dist/drivers/puppeteer/generated/file-chooser.d.ts +0 -34
- package/dist/drivers/puppeteer/generated/file-chooser.js +0 -43
- package/dist/drivers/puppeteer/generated/frame.d.ts +0 -221
- package/dist/drivers/puppeteer/generated/frame.js +0 -302
- package/dist/drivers/puppeteer/generated/http-request.d.ts +0 -195
- package/dist/drivers/puppeteer/generated/http-request.js +0 -243
- package/dist/drivers/puppeteer/generated/http-response.d.ts +0 -142
- package/dist/drivers/puppeteer/generated/http-response.js +0 -169
- package/dist/drivers/puppeteer/generated/js-handle.d.ts +0 -104
- package/dist/drivers/puppeteer/generated/js-handle.js +0 -125
- package/dist/drivers/puppeteer/generated/keyboard.d.ts +0 -79
- package/dist/drivers/puppeteer/generated/keyboard.js +0 -89
- package/dist/drivers/puppeteer/generated/locator.d.ts +0 -141
- package/dist/drivers/puppeteer/generated/locator.js +0 -164
- package/dist/drivers/puppeteer/generated/mouse.d.ts +0 -74
- package/dist/drivers/puppeteer/generated/mouse.js +0 -94
- package/dist/drivers/puppeteer/generated/page.d.ts +0 -604
- package/dist/drivers/puppeteer/generated/page.js +0 -776
- package/dist/drivers/puppeteer/generated/target.d.ts +0 -105
- package/dist/drivers/puppeteer/generated/target.js +0 -123
- package/dist/drivers/puppeteer/generated/touchscreen.d.ts +0 -87
- package/dist/drivers/puppeteer/generated/touchscreen.js +0 -103
- package/dist/drivers/puppeteer/generated/tracing.d.ts +0 -38
- package/dist/drivers/puppeteer/generated/tracing.js +0 -43
- package/dist/drivers/puppeteer/generated/web-worker.d.ts +0 -63
- package/dist/drivers/puppeteer/generated/web-worker.js +0 -73
- package/dist/drivers/puppeteer/index.d.ts +0 -21
- package/dist/drivers/puppeteer/index.js +0 -23
- package/dist/drivers/puppeteer/remote-base.d.ts +0 -57
- package/dist/drivers/puppeteer/remote-base.js +0 -79
- package/dist/drivers/puppeteer/types.d.ts +0 -178
- package/dist/drivers/puppeteer/types.js +0 -8
- package/dist/drivers/selenium/driver.d.ts +0 -28
- package/dist/drivers/selenium/driver.js +0 -169
- package/dist/drivers/selenium/element.d.ts +0 -34
- package/dist/drivers/selenium/element.js +0 -73
- package/dist/drivers/selenium/index.d.ts +0 -3
- package/dist/drivers/selenium/index.js +0 -5
- package/dist/drivers/selenium/types.d.ts +0 -2
- package/dist/drivers/selenium/types.js +0 -12
- package/dist/drivers/stagehand/generated/context.d.ts +0 -127
- package/dist/drivers/stagehand/generated/context.js +0 -153
- package/dist/drivers/stagehand/generated/locator.d.ts +0 -324
- package/dist/drivers/stagehand/generated/locator.js +0 -368
- package/dist/drivers/stagehand/generated/page.d.ts +0 -377
- package/dist/drivers/stagehand/generated/page.js +0 -439
- package/dist/drivers/stagehand/generated/response.d.ts +0 -197
- package/dist/drivers/stagehand/generated/response.js +0 -232
- package/dist/drivers/stagehand/index.d.ts +0 -5
- package/dist/drivers/stagehand/index.js +0 -8
- package/dist/drivers/stagehand/types.d.ts +0 -1
- package/dist/drivers/stagehand/types.js +0 -7
- package/dist/extensions/client.d.ts +0 -47
- package/dist/extensions/client.js +0 -154
- package/dist/extensions/index.d.ts +0 -1
- package/dist/extensions/index.js +0 -1
- package/dist/internal/dev-client.d.ts +0 -5
- package/dist/internal/dev-client.js +0 -9
- package/dist/internal/rpc-targets.d.ts +0 -17
- package/dist/internal/rpc-targets.js +0 -58
- package/dist/internal/serialization.d.ts +0 -32
- package/dist/internal/serialization.js +0 -42
- package/dist/internal/transport.d.ts +0 -24
- package/dist/internal/transport.js +0 -29
- package/dist/playwright.d.ts +0 -1
- package/dist/playwright.js +0 -2
- package/dist/puppeteer.d.ts +0 -1
- package/dist/puppeteer.js +0 -2
- package/dist/selenium.d.ts +0 -1
- package/dist/selenium.js +0 -2
- package/dist/stagehand.d.ts +0 -1
- package/dist/stagehand.js +0 -2
- package/dist/storage/client.d.ts +0 -151
- package/dist/storage/client.js +0 -329
- package/dist/storage/index.d.ts +0 -2
- package/dist/storage/index.js +0 -4
- package/dist/telemetry.d.ts +0 -18
- package/dist/telemetry.js +0 -93
- package/dist/updates/client.d.ts +0 -8
- package/dist/updates/client.js +0 -128
- package/dist/updates/index.d.ts +0 -1
- package/dist/updates/index.js +0 -1
- package/dist/utils/http.d.ts +0 -39
- package/dist/utils/http.js +0 -88
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.js +0 -4
- package/dist/utils/logger.d.ts +0 -27
- package/dist/utils/logger.js +0 -74
- package/dist/utils/schema.d.ts +0 -17
- package/dist/utils/schema.js +0 -31
- package/dist/utils/url.d.ts +0 -5
- package/dist/utils/url.js +0 -7
- package/dist/vault/client.d.ts +0 -43
- package/dist/vault/client.js +0 -123
- package/dist/vault/index.d.ts +0 -1
- package/dist/vault/index.js +0 -1
- package/dist/workspaces/browser-runtime.d.ts +0 -251
- package/dist/workspaces/browser-runtime.js +0 -1025
- package/dist/workspaces/client.d.ts +0 -48
- package/dist/workspaces/client.js +0 -222
- package/dist/workspaces/index.d.ts +0 -2
- package/dist/workspaces/index.js +0 -2
- package/dist/workspaces/runtime-event-pump.d.ts +0 -65
- package/dist/workspaces/runtime-event-pump.js +0 -716
|
@@ -1,762 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* Generated from: packages/automation-spec/src/drivers/playwright/methods/
|
|
5
|
-
* Run `pnpm generate:playwright` to regenerate.
|
|
6
|
-
*/
|
|
7
|
-
import type { SimpleRpcSender } from '../../../internal/transport.js';
|
|
8
|
-
import { PlaywrightEventEmitter } from '../event-emitter.js';
|
|
9
|
-
import { RemotePlaywrightKeyboard } from './keyboard.js';
|
|
10
|
-
import { RemotePlaywrightMouse } from './mouse.js';
|
|
11
|
-
import { RemotePlaywrightTouchscreen } from './touchscreen.js';
|
|
12
|
-
import { RemotePlaywrightClock } from './clock.js';
|
|
13
|
-
import { RemotePlaywrightCoverage } from './coverage.js';
|
|
14
|
-
import { RemotePlaywrightAPIRequestContext } from './api-request-context.js';
|
|
15
|
-
import { RemotePlaywrightFrame } from './frame.js';
|
|
16
|
-
import { RemotePlaywrightLocator } from './locator.js';
|
|
17
|
-
import { RemotePlaywrightElementHandle } from './element-handle.js';
|
|
18
|
-
import { RemotePlaywrightJSHandle } from './js-handle.js';
|
|
19
|
-
import type { FilePayload, LoadState, PageEvents, PlaywrightAddLocatorHandlerOptions, PlaywrightAddScriptTagOptions, PlaywrightAddStyleTagOptions, PlaywrightCheckOptions, PlaywrightClickOptions, PlaywrightConsoleMessage, PlaywrightDblclickOptions, PlaywrightDispatchEventOptions, PlaywrightDragAndDropOptions, PlaywrightEmulateMediaOptions, PlaywrightFillOptions, PlaywrightFocusOptions, PlaywrightGetByAltTextOptions, PlaywrightGetByLabelOptions, PlaywrightGetByPlaceholderOptions, PlaywrightGetByRoleOptions, PlaywrightGetByTextOptions, PlaywrightGetByTitleOptions, PlaywrightGotoOptions, PlaywrightHoverOptions, PlaywrightLocatorOptions, PlaywrightNavigationOptions, PlaywrightPDFOptions, PlaywrightPressOptions, PlaywrightRequest, PlaywrightResponse, PlaywrightRouteFromHAROptions, PlaywrightRouteHandler, PlaywrightScreenshotOptions, PlaywrightSelectOptionOptions, PlaywrightSetCheckedOptions, PlaywrightSetContentOptions, PlaywrightSetInputFilesOptions, PlaywrightTapOptions, PlaywrightTypeOptions, PlaywrightViewportSize, PlaywrightWaitForFunctionOptions, PlaywrightWaitForLoadStateOptions, PlaywrightWaitForNavigationOptions, PlaywrightWaitForSelectorOptions, PlaywrightWaitForURLOptions, PlaywrightWebSocketRoute, SelectOption } from '../types.js';
|
|
20
|
-
/**
|
|
21
|
-
* RemotePlaywrightPage - Remote Playwright Page API over RPC.
|
|
22
|
-
*
|
|
23
|
-
* @see https://playwright.dev/docs/api/class-page
|
|
24
|
-
*/
|
|
25
|
-
export declare class RemotePlaywrightPage extends PlaywrightEventEmitter<PageEvents> {
|
|
26
|
-
readonly keyboard: RemotePlaywrightKeyboard;
|
|
27
|
-
readonly mouse: RemotePlaywrightMouse;
|
|
28
|
-
readonly touchscreen: RemotePlaywrightTouchscreen;
|
|
29
|
-
readonly clock: RemotePlaywrightClock;
|
|
30
|
-
readonly coverage: RemotePlaywrightCoverage;
|
|
31
|
-
readonly request: RemotePlaywrightAPIRequestContext;
|
|
32
|
-
private createElementHandle;
|
|
33
|
-
private createFrame;
|
|
34
|
-
private createLocator;
|
|
35
|
-
private createJSHandle;
|
|
36
|
-
protected sendRpc: SimpleRpcSender;
|
|
37
|
-
private readonly _id;
|
|
38
|
-
constructor(sendRpc: SimpleRpcSender, id: string, createElementHandle: (handleId: string) => RemotePlaywrightElementHandle, createFrame: (frameId: string) => RemotePlaywrightFrame, createLocator: (selector: string) => RemotePlaywrightLocator, createJSHandle: (handleId: string) => RemotePlaywrightJSHandle);
|
|
39
|
-
private _isClosed;
|
|
40
|
-
private _defaultTimeout;
|
|
41
|
-
private _defaultNavigationTimeout;
|
|
42
|
-
private _viewportSize;
|
|
43
|
-
/**
|
|
44
|
-
* Get the page ID.
|
|
45
|
-
*/
|
|
46
|
-
get id(): string;
|
|
47
|
-
/**
|
|
48
|
-
* Mark this page as closed (internal use).
|
|
49
|
-
*/
|
|
50
|
-
markClosed(): void;
|
|
51
|
-
private rpc;
|
|
52
|
-
/**
|
|
53
|
-
* Check if the page is closed.
|
|
54
|
-
* @see https://playwright.dev/docs/api/class-page#page-is-closed
|
|
55
|
-
*/
|
|
56
|
-
isClosed(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Get the viewport size.
|
|
59
|
-
* @see https://playwright.dev/docs/api/class-page#page-viewport-size
|
|
60
|
-
*/
|
|
61
|
-
viewportSize(): PlaywrightViewportSize | null;
|
|
62
|
-
/**
|
|
63
|
-
* Set the viewport size.
|
|
64
|
-
* @see https://playwright.dev/docs/api/class-page#page-set-viewport-size
|
|
65
|
-
*/
|
|
66
|
-
setViewportSize(viewportSize: PlaywrightViewportSize): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Set the default navigation timeout.
|
|
69
|
-
* @see https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout
|
|
70
|
-
*/
|
|
71
|
-
setDefaultNavigationTimeout(timeout: number): Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Set the default timeout.
|
|
74
|
-
* @see https://playwright.dev/docs/api/class-page#page-set-default-timeout
|
|
75
|
-
*/
|
|
76
|
-
setDefaultTimeout(timeout: number): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* Create a locator for the given selector.
|
|
79
|
-
* @see https://playwright.dev/docs/api/class-page#page-locator
|
|
80
|
-
*/
|
|
81
|
-
locator(selector: string, options?: PlaywrightLocatorOptions): RemotePlaywrightLocator;
|
|
82
|
-
/**
|
|
83
|
-
* Locate elements by their ARIA role.
|
|
84
|
-
* @see https://playwright.dev/docs/api/class-page#page-get-by-role
|
|
85
|
-
*/
|
|
86
|
-
getByRole(role: string, options?: PlaywrightGetByRoleOptions): RemotePlaywrightLocator;
|
|
87
|
-
/**
|
|
88
|
-
* Locate elements containing the given text.
|
|
89
|
-
* @see https://playwright.dev/docs/api/class-page#page-get-by-text
|
|
90
|
-
*/
|
|
91
|
-
getByText(text: string | RegExp, options?: PlaywrightGetByTextOptions): RemotePlaywrightLocator;
|
|
92
|
-
/**
|
|
93
|
-
* Locate form controls by their associated label.
|
|
94
|
-
* @see https://playwright.dev/docs/api/class-page#page-get-by-label
|
|
95
|
-
*/
|
|
96
|
-
getByLabel(text: string | RegExp, options?: PlaywrightGetByLabelOptions): RemotePlaywrightLocator;
|
|
97
|
-
/**
|
|
98
|
-
* Locate input elements by placeholder text.
|
|
99
|
-
* @see https://playwright.dev/docs/api/class-page#page-get-by-placeholder
|
|
100
|
-
*/
|
|
101
|
-
getByPlaceholder(text: string | RegExp, options?: PlaywrightGetByPlaceholderOptions): RemotePlaywrightLocator;
|
|
102
|
-
/**
|
|
103
|
-
* Locate elements by alt text.
|
|
104
|
-
* @see https://playwright.dev/docs/api/class-page#page-get-by-alt-text
|
|
105
|
-
*/
|
|
106
|
-
getByAltText(text: string | RegExp, options?: PlaywrightGetByAltTextOptions): RemotePlaywrightLocator;
|
|
107
|
-
/**
|
|
108
|
-
* Locate elements by title attribute.
|
|
109
|
-
* @see https://playwright.dev/docs/api/class-page#page-get-by-title
|
|
110
|
-
*/
|
|
111
|
-
getByTitle(text: string | RegExp, options?: PlaywrightGetByTitleOptions): RemotePlaywrightLocator;
|
|
112
|
-
/**
|
|
113
|
-
* Locate elements by data-testid attribute.
|
|
114
|
-
* @see https://playwright.dev/docs/api/class-page#page-get-by-test-id
|
|
115
|
-
*/
|
|
116
|
-
getByTestId(testId: string | RegExp): RemotePlaywrightLocator;
|
|
117
|
-
/**
|
|
118
|
-
* Create a frame locator.
|
|
119
|
-
* @see https://playwright.dev/docs/api/class-page#page-frame-locator
|
|
120
|
-
*/
|
|
121
|
-
frameLocator(selector: string): RemotePlaywrightLocator;
|
|
122
|
-
/**
|
|
123
|
-
* Get the browser context.
|
|
124
|
-
* @see https://playwright.dev/docs/api/class-page#page-context
|
|
125
|
-
*/
|
|
126
|
-
context(): unknown;
|
|
127
|
-
/**
|
|
128
|
-
* Get the video object.
|
|
129
|
-
* @see https://playwright.dev/docs/api/class-page#page-video
|
|
130
|
-
*/
|
|
131
|
-
video(): {
|
|
132
|
-
path: () => Promise<string | null>;
|
|
133
|
-
saveAs: (path: string) => Promise<void>;
|
|
134
|
-
delete: () => Promise<void>;
|
|
135
|
-
} | null;
|
|
136
|
-
/**
|
|
137
|
-
* Get all web workers in the page.
|
|
138
|
-
* @see https://playwright.dev/docs/api/class-page#page-workers
|
|
139
|
-
*/
|
|
140
|
-
workers(): unknown[];
|
|
141
|
-
/**
|
|
142
|
-
* Registers a handler that will be called when the specified locator becomes visible.
|
|
143
|
-
* @see https://playwright.dev/docs/api/class-page#page-add-locator-handler
|
|
144
|
-
*/
|
|
145
|
-
addLocatorHandler(locator: RemotePlaywrightLocator, handler: (locator: RemotePlaywrightLocator) => Promise<void>, options?: PlaywrightAddLocatorHandlerOptions): Promise<void>;
|
|
146
|
-
/**
|
|
147
|
-
* Removes a previously added locator handler.
|
|
148
|
-
* @see https://playwright.dev/docs/api/class-page#page-remove-locator-handler
|
|
149
|
-
*/
|
|
150
|
-
removeLocatorHandler(locator: RemotePlaywrightLocator): Promise<void>;
|
|
151
|
-
/**
|
|
152
|
-
* Returns all console messages captured during the page lifecycle.
|
|
153
|
-
* @see https://playwright.dev/docs/api/class-consolemessage
|
|
154
|
-
*/
|
|
155
|
-
consoleMessages(): Promise<PlaywrightConsoleMessage[]>;
|
|
156
|
-
/**
|
|
157
|
-
* Returns all page errors (uncaught exceptions) captured during the page lifecycle.
|
|
158
|
-
* @see https://playwright.dev/docs/api/class-page#page-event-page-error
|
|
159
|
-
*/
|
|
160
|
-
pageErrors(): Promise<Error[]>;
|
|
161
|
-
/**
|
|
162
|
-
* Returns all requests made by the page since the last navigation.
|
|
163
|
-
* @see https://playwright.dev/docs/api/class-request
|
|
164
|
-
*/
|
|
165
|
-
requests(): Promise<PlaywrightRequest[]>;
|
|
166
|
-
/**
|
|
167
|
-
* Serves network requests from a HAR (HTTP Archive) file.
|
|
168
|
-
* @see https://playwright.dev/docs/api/class-page#page-route-from-har
|
|
169
|
-
*/
|
|
170
|
-
routeFromHAR(har: string, options?: PlaywrightRouteFromHAROptions): Promise<void>;
|
|
171
|
-
/**
|
|
172
|
-
* Route WebSocket connections matching the URL pattern.
|
|
173
|
-
* @see https://playwright.dev/docs/api/class-page#page-route-web-socket
|
|
174
|
-
*/
|
|
175
|
-
routeWebSocket(url: string | RegExp | ((url: URL) => boolean), handler: (ws: PlaywrightWebSocketRoute) => void | Promise<void>): Promise<void>;
|
|
176
|
-
/**
|
|
177
|
-
* Navigate to a URL.
|
|
178
|
-
* @returns The main resource response, or null if navigating to about:blank.
|
|
179
|
-
*
|
|
180
|
-
* @see https://playwright.dev/docs/api/class-page#page-goto
|
|
181
|
-
*/
|
|
182
|
-
goto(url: string, options?: PlaywrightGotoOptions): Promise<PlaywrightResponse | null>;
|
|
183
|
-
/**
|
|
184
|
-
* Reload the page.
|
|
185
|
-
*
|
|
186
|
-
* @see https://playwright.dev/docs/api/class-page#page-reload
|
|
187
|
-
*/
|
|
188
|
-
reload(options?: PlaywrightNavigationOptions): Promise<PlaywrightResponse | null>;
|
|
189
|
-
/**
|
|
190
|
-
* Navigate back in history.
|
|
191
|
-
*
|
|
192
|
-
* @see https://playwright.dev/docs/api/class-page#page-go-back
|
|
193
|
-
*/
|
|
194
|
-
goBack(options?: PlaywrightNavigationOptions): Promise<PlaywrightResponse | null>;
|
|
195
|
-
/**
|
|
196
|
-
* Navigate forward in history.
|
|
197
|
-
*
|
|
198
|
-
* @see https://playwright.dev/docs/api/class-page#page-go-forward
|
|
199
|
-
*/
|
|
200
|
-
goForward(options?: PlaywrightNavigationOptions): Promise<PlaywrightResponse | null>;
|
|
201
|
-
/**
|
|
202
|
-
* Wait for the main frame to navigate to the given URL.
|
|
203
|
-
*
|
|
204
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-url
|
|
205
|
-
*/
|
|
206
|
-
waitForURL(url: string | RegExp | ((url: URL) => boolean), options?: PlaywrightWaitForURLOptions): Promise<void>;
|
|
207
|
-
/**
|
|
208
|
-
* Wait for the required load state to be reached.
|
|
209
|
-
*
|
|
210
|
-
* @remarks
|
|
211
|
-
* State can be 'load', 'domcontentloaded', or 'networkidle'.
|
|
212
|
-
*
|
|
213
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-load-state
|
|
214
|
-
*/
|
|
215
|
-
waitForLoadState(state?: LoadState, options?: PlaywrightWaitForLoadStateOptions): Promise<void>;
|
|
216
|
-
/**
|
|
217
|
-
* Wait for the main frame navigation and return the main resource response.
|
|
218
|
-
*
|
|
219
|
-
* @remarks
|
|
220
|
-
* Deprecated: This method is inherently racy. Use page.waitForURL() instead.
|
|
221
|
-
*
|
|
222
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-navigation
|
|
223
|
-
*/
|
|
224
|
-
waitForNavigation(options?: PlaywrightWaitForNavigationOptions): Promise<PlaywrightResponse | null>;
|
|
225
|
-
/**
|
|
226
|
-
* Get the page title.
|
|
227
|
-
*
|
|
228
|
-
* @see https://playwright.dev/docs/api/class-page#page-title
|
|
229
|
-
*/
|
|
230
|
-
title(): Promise<string>;
|
|
231
|
-
/**
|
|
232
|
-
* Get the current URL.
|
|
233
|
-
*
|
|
234
|
-
* @see https://playwright.dev/docs/api/class-page#page-url
|
|
235
|
-
*/
|
|
236
|
-
url(): Promise<string>;
|
|
237
|
-
/**
|
|
238
|
-
* Get the full HTML content of the page.
|
|
239
|
-
*
|
|
240
|
-
* @see https://playwright.dev/docs/api/class-page#page-content
|
|
241
|
-
*/
|
|
242
|
-
content(): Promise<string>;
|
|
243
|
-
/**
|
|
244
|
-
* Set the HTML content of the page.
|
|
245
|
-
*
|
|
246
|
-
* @see https://playwright.dev/docs/api/class-page#page-set-content
|
|
247
|
-
*/
|
|
248
|
-
setContent(html: string, options?: PlaywrightSetContentOptions): Promise<void>;
|
|
249
|
-
/**
|
|
250
|
-
* Click on an element matching the selector.
|
|
251
|
-
*
|
|
252
|
-
* @remarks
|
|
253
|
-
* Deprecated: Use locator.click() instead.
|
|
254
|
-
*
|
|
255
|
-
* @see https://playwright.dev/docs/api/class-page#page-click
|
|
256
|
-
*/
|
|
257
|
-
click(selector: string, options?: PlaywrightClickOptions): Promise<void>;
|
|
258
|
-
/**
|
|
259
|
-
* Double-click on an element matching the selector.
|
|
260
|
-
*
|
|
261
|
-
* @remarks
|
|
262
|
-
* Deprecated: Use locator.dblclick() instead.
|
|
263
|
-
*
|
|
264
|
-
* @see https://playwright.dev/docs/api/class-page#page-dblclick
|
|
265
|
-
*/
|
|
266
|
-
dblclick(selector: string, options?: PlaywrightDblclickOptions): Promise<void>;
|
|
267
|
-
/**
|
|
268
|
-
* Fill an input element with the given value.
|
|
269
|
-
*
|
|
270
|
-
* @remarks
|
|
271
|
-
* Deprecated: Use locator.fill() instead.
|
|
272
|
-
*
|
|
273
|
-
* @see https://playwright.dev/docs/api/class-page#page-fill
|
|
274
|
-
*/
|
|
275
|
-
fill(selector: string, value: string, options?: PlaywrightFillOptions): Promise<void>;
|
|
276
|
-
/**
|
|
277
|
-
* Type text into an element (sends keydown, keypress/input, keyup events for each character).
|
|
278
|
-
*
|
|
279
|
-
* @remarks
|
|
280
|
-
* Deprecated: Use locator.pressSequentially() instead.
|
|
281
|
-
*
|
|
282
|
-
* @see https://playwright.dev/docs/api/class-page#page-type
|
|
283
|
-
*/
|
|
284
|
-
type(selector: string, text: string, options?: PlaywrightTypeOptions): Promise<void>;
|
|
285
|
-
/**
|
|
286
|
-
* Focus an element and press a key combination.
|
|
287
|
-
*
|
|
288
|
-
* @remarks
|
|
289
|
-
* Deprecated: Use locator.press() instead.
|
|
290
|
-
*
|
|
291
|
-
* @see https://playwright.dev/docs/api/class-page#page-press
|
|
292
|
-
*/
|
|
293
|
-
press(selector: string, key: string, options?: PlaywrightPressOptions): Promise<void>;
|
|
294
|
-
/**
|
|
295
|
-
* Hover over an element.
|
|
296
|
-
*
|
|
297
|
-
* @remarks
|
|
298
|
-
* Deprecated: Use locator.hover() instead.
|
|
299
|
-
*
|
|
300
|
-
* @see https://playwright.dev/docs/api/class-page#page-hover
|
|
301
|
-
*/
|
|
302
|
-
hover(selector: string, options?: PlaywrightHoverOptions): Promise<void>;
|
|
303
|
-
/**
|
|
304
|
-
* Focus on an element.
|
|
305
|
-
*
|
|
306
|
-
* @remarks
|
|
307
|
-
* Deprecated: Use locator.focus() instead.
|
|
308
|
-
*
|
|
309
|
-
* @see https://playwright.dev/docs/api/class-page#page-focus
|
|
310
|
-
*/
|
|
311
|
-
focus(selector: string, options?: PlaywrightFocusOptions): Promise<void>;
|
|
312
|
-
/**
|
|
313
|
-
* Tap on an element (for touch devices).
|
|
314
|
-
*
|
|
315
|
-
* @remarks
|
|
316
|
-
* Deprecated: Use locator.tap() instead.
|
|
317
|
-
*
|
|
318
|
-
* @see https://playwright.dev/docs/api/class-page#page-tap
|
|
319
|
-
*/
|
|
320
|
-
tap(selector: string, options?: PlaywrightTapOptions): Promise<void>;
|
|
321
|
-
/**
|
|
322
|
-
* Check a checkbox or radio button.
|
|
323
|
-
*
|
|
324
|
-
* @remarks
|
|
325
|
-
* Deprecated: Use locator.check() instead.
|
|
326
|
-
*
|
|
327
|
-
* @see https://playwright.dev/docs/api/class-page#page-check
|
|
328
|
-
*/
|
|
329
|
-
check(selector: string, options?: PlaywrightCheckOptions): Promise<void>;
|
|
330
|
-
/**
|
|
331
|
-
* Uncheck a checkbox.
|
|
332
|
-
*
|
|
333
|
-
* @remarks
|
|
334
|
-
* Deprecated: Use locator.uncheck() instead.
|
|
335
|
-
*
|
|
336
|
-
* @see https://playwright.dev/docs/api/class-page#page-uncheck
|
|
337
|
-
*/
|
|
338
|
-
uncheck(selector: string, options?: PlaywrightCheckOptions): Promise<void>;
|
|
339
|
-
/**
|
|
340
|
-
* Set the checked state of a checkbox.
|
|
341
|
-
*
|
|
342
|
-
* @remarks
|
|
343
|
-
* Deprecated: Use locator.setChecked() instead.
|
|
344
|
-
*
|
|
345
|
-
* @see https://playwright.dev/docs/api/class-page#page-set-checked
|
|
346
|
-
*/
|
|
347
|
-
setChecked(selector: string, checked: boolean, options?: PlaywrightSetCheckedOptions): Promise<void>;
|
|
348
|
-
/**
|
|
349
|
-
* Select one or more options in a <select> element.
|
|
350
|
-
*
|
|
351
|
-
* @remarks
|
|
352
|
-
* Deprecated: Use locator.selectOption() instead.
|
|
353
|
-
*
|
|
354
|
-
* @see https://playwright.dev/docs/api/class-page#page-select-option
|
|
355
|
-
*/
|
|
356
|
-
selectOption(selector: string, values: string | SelectOption | (string | SelectOption)[], options?: PlaywrightSelectOptionOptions): Promise<string[]>;
|
|
357
|
-
/**
|
|
358
|
-
* Set input files for a file input element.
|
|
359
|
-
*
|
|
360
|
-
* @remarks
|
|
361
|
-
* Deprecated: Use locator.setInputFiles() instead.
|
|
362
|
-
*
|
|
363
|
-
* @see https://playwright.dev/docs/api/class-page#page-set-input-files
|
|
364
|
-
*/
|
|
365
|
-
setInputFiles(selector: string, files: string | string[] | FilePayload | FilePayload[], options?: PlaywrightSetInputFilesOptions): Promise<void>;
|
|
366
|
-
/**
|
|
367
|
-
* Dispatch a DOM event on an element.
|
|
368
|
-
*
|
|
369
|
-
* @remarks
|
|
370
|
-
* Deprecated: Use locator.dispatchEvent() instead.
|
|
371
|
-
*
|
|
372
|
-
* @see https://playwright.dev/docs/api/class-page#page-dispatch-event
|
|
373
|
-
*/
|
|
374
|
-
dispatchEvent(selector: string, type: string, eventInit?: Record<string, unknown>, options?: PlaywrightDispatchEventOptions): Promise<void>;
|
|
375
|
-
/**
|
|
376
|
-
* Drag an element to another element.
|
|
377
|
-
*
|
|
378
|
-
* @see https://playwright.dev/docs/api/class-page#page-drag-and-drop
|
|
379
|
-
*/
|
|
380
|
-
dragAndDrop(source: string, target: string, options?: PlaywrightDragAndDropOptions): Promise<void>;
|
|
381
|
-
/**
|
|
382
|
-
* Wait for a selector to appear in the DOM.
|
|
383
|
-
*
|
|
384
|
-
* @remarks
|
|
385
|
-
* Deprecated: Use locator-based methods or web assertions instead.
|
|
386
|
-
*
|
|
387
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-selector
|
|
388
|
-
*/
|
|
389
|
-
waitForSelector(selector: string, options?: PlaywrightWaitForSelectorOptions): Promise<RemotePlaywrightElementHandle | null>;
|
|
390
|
-
/**
|
|
391
|
-
* Wait for the specified timeout.
|
|
392
|
-
*
|
|
393
|
-
* @remarks
|
|
394
|
-
* Discouraged: Use time-based assertions or auto-waiting instead.
|
|
395
|
-
*
|
|
396
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-timeout
|
|
397
|
-
*/
|
|
398
|
-
waitForTimeout(timeout: number): Promise<void>;
|
|
399
|
-
/**
|
|
400
|
-
* Wait for a function to return a truthy value.
|
|
401
|
-
*
|
|
402
|
-
* @remarks
|
|
403
|
-
* Note: Returns a serialized handle reference. Full JSHandle support not yet available.
|
|
404
|
-
*
|
|
405
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-function
|
|
406
|
-
*/
|
|
407
|
-
waitForFunction(pageFunction: Function | string, arg?: unknown, options?: PlaywrightWaitForFunctionOptions): Promise<unknown>;
|
|
408
|
-
/**
|
|
409
|
-
* Wait for a specific event to fire.
|
|
410
|
-
*
|
|
411
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-event
|
|
412
|
-
*/
|
|
413
|
-
waitForEvent<K extends keyof PageEvents>(event: K, optionsOrPredicate?: {
|
|
414
|
-
predicate?: (event: PageEvents[K]) => boolean | Promise<boolean>;
|
|
415
|
-
timeout?: number;
|
|
416
|
-
} | ((event: PageEvents[K]) => boolean | Promise<boolean>)): Promise<PageEvents[K]>;
|
|
417
|
-
/**
|
|
418
|
-
* Wait for a specific request.
|
|
419
|
-
*
|
|
420
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-request
|
|
421
|
-
*/
|
|
422
|
-
waitForRequest(urlOrPredicate: string | RegExp | ((request: PlaywrightRequest) => boolean | Promise<boolean>), options?: {
|
|
423
|
-
timeout?: number;
|
|
424
|
-
}): Promise<PlaywrightRequest>;
|
|
425
|
-
/**
|
|
426
|
-
* Wait for a specific response.
|
|
427
|
-
*
|
|
428
|
-
* @see https://playwright.dev/docs/api/class-page#page-wait-for-response
|
|
429
|
-
*/
|
|
430
|
-
waitForResponse(urlOrPredicate: string | RegExp | ((response: PlaywrightResponse) => boolean | Promise<boolean>), options?: {
|
|
431
|
-
timeout?: number;
|
|
432
|
-
}): Promise<PlaywrightResponse>;
|
|
433
|
-
/**
|
|
434
|
-
* Evaluate JavaScript in the page context.
|
|
435
|
-
*
|
|
436
|
-
* @see https://playwright.dev/docs/api/class-page#page-evaluate
|
|
437
|
-
*/
|
|
438
|
-
evaluate<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<R>;
|
|
439
|
-
/**
|
|
440
|
-
* Evaluate JavaScript and return a handle to the result.
|
|
441
|
-
*
|
|
442
|
-
* @see https://playwright.dev/docs/api/class-page#page-evaluate-handle
|
|
443
|
-
*/
|
|
444
|
-
evaluateHandle<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<RemotePlaywrightJSHandle>;
|
|
445
|
-
/**
|
|
446
|
-
* Query for a single element. Alias for page.querySelector().
|
|
447
|
-
*
|
|
448
|
-
* @remarks
|
|
449
|
-
* Deprecated: Use locator() instead.
|
|
450
|
-
*
|
|
451
|
-
* @see https://playwright.dev/docs/api/class-page#page-query-selector
|
|
452
|
-
*/
|
|
453
|
-
$(selector: string): Promise<RemotePlaywrightElementHandle | null>;
|
|
454
|
-
/**
|
|
455
|
-
* Query for all matching elements. Alias for page.querySelectorAll().
|
|
456
|
-
*
|
|
457
|
-
* @remarks
|
|
458
|
-
* Deprecated: Use locator() instead.
|
|
459
|
-
*
|
|
460
|
-
* @see https://playwright.dev/docs/api/class-page#page-query-selector-all
|
|
461
|
-
*/
|
|
462
|
-
$$(selector: string): Promise<RemotePlaywrightElementHandle[]>;
|
|
463
|
-
/**
|
|
464
|
-
* Query for a single element.
|
|
465
|
-
*
|
|
466
|
-
* @remarks
|
|
467
|
-
* Deprecated: Use locator() instead.
|
|
468
|
-
*
|
|
469
|
-
* @see https://playwright.dev/docs/api/class-page#page-query-selector
|
|
470
|
-
*/
|
|
471
|
-
querySelector(selector: string): Promise<RemotePlaywrightElementHandle | null>;
|
|
472
|
-
/**
|
|
473
|
-
* Query for all matching elements.
|
|
474
|
-
*
|
|
475
|
-
* @remarks
|
|
476
|
-
* Deprecated: Use locator() instead.
|
|
477
|
-
*
|
|
478
|
-
* @see https://playwright.dev/docs/api/class-page#page-query-selector-all
|
|
479
|
-
*/
|
|
480
|
-
querySelectorAll(selector: string): Promise<RemotePlaywrightElementHandle[]>;
|
|
481
|
-
/**
|
|
482
|
-
* Find an element matching the selector and evaluate a function on it.
|
|
483
|
-
*
|
|
484
|
-
* @remarks
|
|
485
|
-
* Deprecated: This method does not wait for the element to pass actionability checks. Use locator.evaluate() instead.
|
|
486
|
-
*
|
|
487
|
-
* @see https://playwright.dev/docs/api/class-page#page-eval-on-selector
|
|
488
|
-
*/
|
|
489
|
-
$eval<T = unknown>(selector: string, pageFunction: Function | string, arg?: unknown): Promise<T>;
|
|
490
|
-
/**
|
|
491
|
-
* Find all elements matching the selector and evaluate a function on the array of elements.
|
|
492
|
-
*
|
|
493
|
-
* @remarks
|
|
494
|
-
* Deprecated: This method does not wait for elements to pass actionability checks. Use locator.evaluateAll() instead.
|
|
495
|
-
*
|
|
496
|
-
* @see https://playwright.dev/docs/api/class-page#page-eval-on-selector-all
|
|
497
|
-
*/
|
|
498
|
-
$$eval<T = unknown>(selector: string, pageFunction: Function | string, arg?: unknown): Promise<T>;
|
|
499
|
-
/**
|
|
500
|
-
* Take a screenshot of the page.
|
|
501
|
-
*
|
|
502
|
-
* @see https://playwright.dev/docs/api/class-page#page-screenshot
|
|
503
|
-
*/
|
|
504
|
-
screenshot(options?: PlaywrightScreenshotOptions): Promise<Buffer>;
|
|
505
|
-
/**
|
|
506
|
-
* Generate a PDF of the page (Chromium only).
|
|
507
|
-
*
|
|
508
|
-
* @see https://playwright.dev/docs/api/class-page#page-pdf
|
|
509
|
-
*/
|
|
510
|
-
pdf(options?: PlaywrightPDFOptions): Promise<Buffer>;
|
|
511
|
-
/**
|
|
512
|
-
* Emulate media type, color scheme, etc.
|
|
513
|
-
*
|
|
514
|
-
* @see https://playwright.dev/docs/api/class-page#page-emulate-media
|
|
515
|
-
*/
|
|
516
|
-
emulateMedia(options?: PlaywrightEmulateMediaOptions): Promise<void>;
|
|
517
|
-
/**
|
|
518
|
-
* Get the main frame.
|
|
519
|
-
*
|
|
520
|
-
* @see https://playwright.dev/docs/api/class-page#page-main-frame
|
|
521
|
-
*/
|
|
522
|
-
mainFrame(): Promise<RemotePlaywrightFrame>;
|
|
523
|
-
/**
|
|
524
|
-
* Get all frames attached to the page.
|
|
525
|
-
*
|
|
526
|
-
* @see https://playwright.dev/docs/api/class-page#page-frames
|
|
527
|
-
*/
|
|
528
|
-
frames(): Promise<RemotePlaywrightFrame[]>;
|
|
529
|
-
/**
|
|
530
|
-
* Get a frame by name or URL.
|
|
531
|
-
*
|
|
532
|
-
* @see https://playwright.dev/docs/api/class-page#page-frame
|
|
533
|
-
*/
|
|
534
|
-
frame(frameSelector: string | {
|
|
535
|
-
name?: string;
|
|
536
|
-
url?: string | RegExp | ((url: URL) => boolean);
|
|
537
|
-
}): Promise<RemotePlaywrightFrame | null>;
|
|
538
|
-
/**
|
|
539
|
-
* Route requests matching the URL pattern.
|
|
540
|
-
*
|
|
541
|
-
* @see https://playwright.dev/docs/api/class-page#page-route
|
|
542
|
-
*/
|
|
543
|
-
route(url: string | RegExp | ((url: URL) => boolean), handler: PlaywrightRouteHandler, options?: {
|
|
544
|
-
times?: number;
|
|
545
|
-
}): Promise<void>;
|
|
546
|
-
/**
|
|
547
|
-
* Remove a route.
|
|
548
|
-
*
|
|
549
|
-
* @see https://playwright.dev/docs/api/class-page#page-unroute
|
|
550
|
-
*/
|
|
551
|
-
unroute(url: string | RegExp | ((url: URL) => boolean), handler?: PlaywrightRouteHandler): Promise<void>;
|
|
552
|
-
/**
|
|
553
|
-
* Remove all routes.
|
|
554
|
-
*
|
|
555
|
-
* @see https://playwright.dev/docs/api/class-page#page-unroute-all
|
|
556
|
-
*/
|
|
557
|
-
unrouteAll(options?: {
|
|
558
|
-
behavior?: "wait" | "ignoreErrors" | "default";
|
|
559
|
-
}): Promise<void>;
|
|
560
|
-
/**
|
|
561
|
-
* Set extra HTTP headers for all requests.
|
|
562
|
-
*
|
|
563
|
-
* @see https://playwright.dev/docs/api/class-page#page-set-extra-http-headers
|
|
564
|
-
*/
|
|
565
|
-
setExtraHTTPHeaders(headers: Record<string, string>): Promise<void>;
|
|
566
|
-
/**
|
|
567
|
-
* Close the page.
|
|
568
|
-
*
|
|
569
|
-
* @see https://playwright.dev/docs/api/class-page#page-close
|
|
570
|
-
*/
|
|
571
|
-
close(options?: {
|
|
572
|
-
runBeforeUnload?: boolean;
|
|
573
|
-
}): Promise<void>;
|
|
574
|
-
/**
|
|
575
|
-
* Bring page to front (activate tab).
|
|
576
|
-
*
|
|
577
|
-
* @see https://playwright.dev/docs/api/class-page#page-bring-to-front
|
|
578
|
-
*/
|
|
579
|
-
bringToFront(): Promise<void>;
|
|
580
|
-
/**
|
|
581
|
-
* Add a script to evaluate before page scripts run.
|
|
582
|
-
*
|
|
583
|
-
* @see https://playwright.dev/docs/api/class-page#page-add-init-script
|
|
584
|
-
*/
|
|
585
|
-
addInitScript(script: Function | string | {
|
|
586
|
-
path?: string;
|
|
587
|
-
content?: string;
|
|
588
|
-
}, arg?: unknown): Promise<void>;
|
|
589
|
-
/**
|
|
590
|
-
* Add a <script> tag to the page.
|
|
591
|
-
*
|
|
592
|
-
* @see https://playwright.dev/docs/api/class-page#page-add-script-tag
|
|
593
|
-
*/
|
|
594
|
-
addScriptTag(options: PlaywrightAddScriptTagOptions): Promise<RemotePlaywrightElementHandle>;
|
|
595
|
-
/**
|
|
596
|
-
* Add a <style> tag to the page.
|
|
597
|
-
*
|
|
598
|
-
* @see https://playwright.dev/docs/api/class-page#page-add-style-tag
|
|
599
|
-
*/
|
|
600
|
-
addStyleTag(options: PlaywrightAddStyleTagOptions): Promise<RemotePlaywrightElementHandle>;
|
|
601
|
-
/**
|
|
602
|
-
* Expose a binding to the page (with source info).
|
|
603
|
-
*
|
|
604
|
-
* @see https://playwright.dev/docs/api/class-page#page-expose-binding
|
|
605
|
-
*/
|
|
606
|
-
exposeBinding(name: string, callback: Function, options?: {
|
|
607
|
-
handle?: boolean;
|
|
608
|
-
}): Promise<void>;
|
|
609
|
-
/**
|
|
610
|
-
* Check if an element is visible.
|
|
611
|
-
*
|
|
612
|
-
* @remarks
|
|
613
|
-
* Deprecated: Use locator.isVisible() instead.
|
|
614
|
-
*
|
|
615
|
-
* @see https://playwright.dev/docs/api/class-page#page-is-visible
|
|
616
|
-
*/
|
|
617
|
-
isVisible(selector: string, options?: {
|
|
618
|
-
strict?: boolean;
|
|
619
|
-
timeout?: number;
|
|
620
|
-
}): Promise<boolean>;
|
|
621
|
-
/**
|
|
622
|
-
* Check if an element is hidden.
|
|
623
|
-
*
|
|
624
|
-
* @remarks
|
|
625
|
-
* Deprecated: Use locator.isHidden() instead.
|
|
626
|
-
*
|
|
627
|
-
* @see https://playwright.dev/docs/api/class-page#page-is-hidden
|
|
628
|
-
*/
|
|
629
|
-
isHidden(selector: string, options?: {
|
|
630
|
-
strict?: boolean;
|
|
631
|
-
timeout?: number;
|
|
632
|
-
}): Promise<boolean>;
|
|
633
|
-
/**
|
|
634
|
-
* Check if an element is enabled.
|
|
635
|
-
*
|
|
636
|
-
* @remarks
|
|
637
|
-
* Deprecated: Use locator.isEnabled() instead.
|
|
638
|
-
*
|
|
639
|
-
* @see https://playwright.dev/docs/api/class-page#page-is-enabled
|
|
640
|
-
*/
|
|
641
|
-
isEnabled(selector: string, options?: {
|
|
642
|
-
strict?: boolean;
|
|
643
|
-
timeout?: number;
|
|
644
|
-
}): Promise<boolean>;
|
|
645
|
-
/**
|
|
646
|
-
* Check if an element is disabled.
|
|
647
|
-
*
|
|
648
|
-
* @remarks
|
|
649
|
-
* Deprecated: Use locator.isDisabled() instead.
|
|
650
|
-
*
|
|
651
|
-
* @see https://playwright.dev/docs/api/class-page#page-is-disabled
|
|
652
|
-
*/
|
|
653
|
-
isDisabled(selector: string, options?: {
|
|
654
|
-
strict?: boolean;
|
|
655
|
-
timeout?: number;
|
|
656
|
-
}): Promise<boolean>;
|
|
657
|
-
/**
|
|
658
|
-
* Check if an element is editable.
|
|
659
|
-
*
|
|
660
|
-
* @remarks
|
|
661
|
-
* Deprecated: Use locator.isEditable() instead.
|
|
662
|
-
*
|
|
663
|
-
* @see https://playwright.dev/docs/api/class-page#page-is-editable
|
|
664
|
-
*/
|
|
665
|
-
isEditable(selector: string, options?: {
|
|
666
|
-
strict?: boolean;
|
|
667
|
-
timeout?: number;
|
|
668
|
-
}): Promise<boolean>;
|
|
669
|
-
/**
|
|
670
|
-
* Check if a checkbox is checked.
|
|
671
|
-
*
|
|
672
|
-
* @remarks
|
|
673
|
-
* Deprecated: Use locator.isChecked() instead.
|
|
674
|
-
*
|
|
675
|
-
* @see https://playwright.dev/docs/api/class-page#page-is-checked
|
|
676
|
-
*/
|
|
677
|
-
isChecked(selector: string, options?: {
|
|
678
|
-
strict?: boolean;
|
|
679
|
-
timeout?: number;
|
|
680
|
-
}): Promise<boolean>;
|
|
681
|
-
/**
|
|
682
|
-
* Get an attribute value from an element.
|
|
683
|
-
*
|
|
684
|
-
* @remarks
|
|
685
|
-
* Deprecated: Use locator.getAttribute() instead.
|
|
686
|
-
*
|
|
687
|
-
* @see https://playwright.dev/docs/api/class-page#page-get-attribute
|
|
688
|
-
*/
|
|
689
|
-
getAttribute(selector: string, name: string, options?: {
|
|
690
|
-
strict?: boolean;
|
|
691
|
-
timeout?: number;
|
|
692
|
-
}): Promise<string | null>;
|
|
693
|
-
/**
|
|
694
|
-
* Get the text content of an element.
|
|
695
|
-
*
|
|
696
|
-
* @remarks
|
|
697
|
-
* Deprecated: Use locator.textContent() instead.
|
|
698
|
-
*
|
|
699
|
-
* @see https://playwright.dev/docs/api/class-page#page-text-content
|
|
700
|
-
*/
|
|
701
|
-
textContent(selector: string, options?: {
|
|
702
|
-
strict?: boolean;
|
|
703
|
-
timeout?: number;
|
|
704
|
-
}): Promise<string | null>;
|
|
705
|
-
/**
|
|
706
|
-
* Get the inner text of an element.
|
|
707
|
-
*
|
|
708
|
-
* @remarks
|
|
709
|
-
* Deprecated: Use locator.innerText() instead.
|
|
710
|
-
*
|
|
711
|
-
* @see https://playwright.dev/docs/api/class-page#page-inner-text
|
|
712
|
-
*/
|
|
713
|
-
innerText(selector: string, options?: {
|
|
714
|
-
strict?: boolean;
|
|
715
|
-
timeout?: number;
|
|
716
|
-
}): Promise<string>;
|
|
717
|
-
/**
|
|
718
|
-
* Get the inner HTML of an element.
|
|
719
|
-
*
|
|
720
|
-
* @remarks
|
|
721
|
-
* Deprecated: Use locator.innerHTML() instead.
|
|
722
|
-
*
|
|
723
|
-
* @see https://playwright.dev/docs/api/class-page#page-inner-html
|
|
724
|
-
*/
|
|
725
|
-
innerHTML(selector: string, options?: {
|
|
726
|
-
strict?: boolean;
|
|
727
|
-
timeout?: number;
|
|
728
|
-
}): Promise<string>;
|
|
729
|
-
/**
|
|
730
|
-
* Get the input value of an element.
|
|
731
|
-
*
|
|
732
|
-
* @remarks
|
|
733
|
-
* Deprecated: Use locator.inputValue() instead.
|
|
734
|
-
*
|
|
735
|
-
* @see https://playwright.dev/docs/api/class-page#page-input-value
|
|
736
|
-
*/
|
|
737
|
-
inputValue(selector: string, options?: {
|
|
738
|
-
strict?: boolean;
|
|
739
|
-
timeout?: number;
|
|
740
|
-
}): Promise<string>;
|
|
741
|
-
/**
|
|
742
|
-
* Pause script execution (for debugging).
|
|
743
|
-
*
|
|
744
|
-
* @see https://playwright.dev/docs/api/class-page#page-pause
|
|
745
|
-
*/
|
|
746
|
-
pause(): Promise<void>;
|
|
747
|
-
/**
|
|
748
|
-
* Get the page that opened this page (via window.open).
|
|
749
|
-
*
|
|
750
|
-
* @see https://playwright.dev/docs/api/class-page#page-opener
|
|
751
|
-
*/
|
|
752
|
-
opener(): Promise<RemotePlaywrightPage | null>;
|
|
753
|
-
/**
|
|
754
|
-
* Request garbage collection in the page context.
|
|
755
|
-
*
|
|
756
|
-
* @remarks
|
|
757
|
-
* Note: This method is only available in Chromium-based browsers.
|
|
758
|
-
*
|
|
759
|
-
* @see https://playwright.dev/docs/api/class-page#page-request-gc
|
|
760
|
-
*/
|
|
761
|
-
requestGC(): Promise<void>;
|
|
762
|
-
}
|