@bctrl/sdk 1.0.1 → 1.0.2
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 +24 -29
- package/dist/bctrl.d.ts +22 -36
- package/dist/bctrl.js +40 -75
- package/dist/browsers.d.ts +24 -0
- package/dist/browsers.js +82 -0
- 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 +8 -23
- package/dist/invocations.d.ts +24 -0
- package/dist/invocations.js +66 -0
- package/dist/pagination.d.ts +2 -0
- package/dist/pagination.js +13 -0
- package/dist/runs.d.ts +38 -0
- package/dist/runs.js +99 -0
- package/dist/runtimes.d.ts +73 -0
- package/dist/runtimes.js +205 -0
- package/dist/spaces.d.ts +41 -0
- package/dist/spaces.js +96 -0
- package/dist/types.d.ts +386 -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 +12 -31
- 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,34 +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 { RemoteComponentBase } from '../remote-base.js';
|
|
9
|
-
/**
|
|
10
|
-
* RemotePlaywrightTouchscreen - Remote Playwright Touchscreen API over RPC.
|
|
11
|
-
*
|
|
12
|
-
* @see https://playwright.dev/docs/api/class-touchscreen
|
|
13
|
-
*/
|
|
14
|
-
export declare class RemotePlaywrightTouchscreen extends RemoteComponentBase {
|
|
15
|
-
constructor(sendRpc: SimpleRpcSender);
|
|
16
|
-
/**
|
|
17
|
-
* Dispatches a touchstart and touchend event with a single touch at the position (x, y).
|
|
18
|
-
* @param x - X coordinate relative to the main frame viewport in CSS pixels.
|
|
19
|
-
* @param y - Y coordinate relative to the main frame viewport in CSS pixels.
|
|
20
|
-
*
|
|
21
|
-
* @remarks
|
|
22
|
-
* This method simulates a tap gesture on a touchscreen device.
|
|
23
|
-
*
|
|
24
|
-
* Note: The page must be initialized with hasTouch option of the browser context set to true.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* await page.touchscreen.tap(100, 200);
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @see https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap
|
|
32
|
-
*/
|
|
33
|
-
tap(x: number, y: number): Promise<void>;
|
|
34
|
-
}
|
|
@@ -1,37 +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 { RemoteComponentBase } from '../remote-base.js';
|
|
8
|
-
/**
|
|
9
|
-
* RemotePlaywrightTouchscreen - Remote Playwright Touchscreen API over RPC.
|
|
10
|
-
*
|
|
11
|
-
* @see https://playwright.dev/docs/api/class-touchscreen
|
|
12
|
-
*/
|
|
13
|
-
export class RemotePlaywrightTouchscreen extends RemoteComponentBase {
|
|
14
|
-
constructor(sendRpc) {
|
|
15
|
-
super(sendRpc);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Dispatches a touchstart and touchend event with a single touch at the position (x, y).
|
|
19
|
-
* @param x - X coordinate relative to the main frame viewport in CSS pixels.
|
|
20
|
-
* @param y - Y coordinate relative to the main frame viewport in CSS pixels.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* This method simulates a tap gesture on a touchscreen device.
|
|
24
|
-
*
|
|
25
|
-
* Note: The page must be initialized with hasTouch option of the browser context set to true.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* await page.touchscreen.tap(100, 200);
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* @see https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap
|
|
33
|
-
*/
|
|
34
|
-
async tap(x, y) {
|
|
35
|
-
await this.rpc('touchscreen.tap', [x, y]);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,78 +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 { RemoteComponentBase } from '../remote-base.js';
|
|
9
|
-
import type { PlaywrightTracingStartOptions, PlaywrightTracingStopOptions } from '../types.js';
|
|
10
|
-
/**
|
|
11
|
-
* RemotePlaywrightTracing - Remote Playwright Tracing API over RPC.
|
|
12
|
-
*
|
|
13
|
-
* @see https://playwright.dev/docs/api/class-tracing
|
|
14
|
-
*/
|
|
15
|
-
export declare class RemotePlaywrightTracing extends RemoteComponentBase {
|
|
16
|
-
/** Parent context ID */
|
|
17
|
-
private readonly _contextId;
|
|
18
|
-
constructor(sendRpc: SimpleRpcSender, contextId: string);
|
|
19
|
-
/**
|
|
20
|
-
* Start tracing to capture browser operations and network activity.
|
|
21
|
-
* @param options - Tracing options.
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* Only one trace can be active at a time per browser context.
|
|
25
|
-
*
|
|
26
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-start
|
|
27
|
-
*/
|
|
28
|
-
start(options?: PlaywrightTracingStartOptions): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Start a new trace chunk.
|
|
31
|
-
* @param options - Chunk options.
|
|
32
|
-
*
|
|
33
|
-
* @remarks
|
|
34
|
-
* If you want to record multiple traces for the same context, use start once and then startChunk/stopChunk for each trace.
|
|
35
|
-
*
|
|
36
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-start-chunk
|
|
37
|
-
*/
|
|
38
|
-
startChunk(options?: {
|
|
39
|
-
name?: string;
|
|
40
|
-
title?: string;
|
|
41
|
-
}): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Stop tracing and export it into a file.
|
|
44
|
-
* @param options - Stop options including path to save trace.
|
|
45
|
-
*
|
|
46
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-stop
|
|
47
|
-
*/
|
|
48
|
-
stop(options?: PlaywrightTracingStopOptions): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Stop the current trace chunk and export it.
|
|
51
|
-
* @param options - Path to save the trace chunk.
|
|
52
|
-
*
|
|
53
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk
|
|
54
|
-
*/
|
|
55
|
-
stopChunk(options?: {
|
|
56
|
-
path?: string;
|
|
57
|
-
}): Promise<void>;
|
|
58
|
-
/**
|
|
59
|
-
* Creates a new trace group. All actions between group and groupEnd will be grouped together.
|
|
60
|
-
* @param name - Group name shown in trace viewer.
|
|
61
|
-
* @param options - Optional source location for the group.
|
|
62
|
-
*
|
|
63
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-group
|
|
64
|
-
*/
|
|
65
|
-
group(name: string, options?: {
|
|
66
|
-
location?: {
|
|
67
|
-
file: string;
|
|
68
|
-
line?: number;
|
|
69
|
-
column?: number;
|
|
70
|
-
};
|
|
71
|
-
}): Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Closes the last trace group opened by tracing.group().
|
|
74
|
-
*
|
|
75
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-group-end
|
|
76
|
-
*/
|
|
77
|
-
groupEnd(): Promise<void>;
|
|
78
|
-
}
|
|
@@ -1,80 +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 { RemoteComponentBase } from '../remote-base.js';
|
|
8
|
-
/**
|
|
9
|
-
* RemotePlaywrightTracing - Remote Playwright Tracing API over RPC.
|
|
10
|
-
*
|
|
11
|
-
* @see https://playwright.dev/docs/api/class-tracing
|
|
12
|
-
*/
|
|
13
|
-
export class RemotePlaywrightTracing extends RemoteComponentBase {
|
|
14
|
-
/** Parent context ID */
|
|
15
|
-
_contextId;
|
|
16
|
-
constructor(sendRpc, contextId) {
|
|
17
|
-
super(sendRpc);
|
|
18
|
-
this._contextId = contextId;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Start tracing to capture browser operations and network activity.
|
|
22
|
-
* @param options - Tracing options.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* Only one trace can be active at a time per browser context.
|
|
26
|
-
*
|
|
27
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-start
|
|
28
|
-
*/
|
|
29
|
-
async start(options) {
|
|
30
|
-
await this.rpc('tracing.start', [options]);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Start a new trace chunk.
|
|
34
|
-
* @param options - Chunk options.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* If you want to record multiple traces for the same context, use start once and then startChunk/stopChunk for each trace.
|
|
38
|
-
*
|
|
39
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-start-chunk
|
|
40
|
-
*/
|
|
41
|
-
async startChunk(options) {
|
|
42
|
-
await this.rpc('tracing.startChunk', [options]);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Stop tracing and export it into a file.
|
|
46
|
-
* @param options - Stop options including path to save trace.
|
|
47
|
-
*
|
|
48
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-stop
|
|
49
|
-
*/
|
|
50
|
-
async stop(options) {
|
|
51
|
-
await this.rpc('tracing.stop', [options]);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Stop the current trace chunk and export it.
|
|
55
|
-
* @param options - Path to save the trace chunk.
|
|
56
|
-
*
|
|
57
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk
|
|
58
|
-
*/
|
|
59
|
-
async stopChunk(options) {
|
|
60
|
-
await this.rpc('tracing.stopChunk', [options]);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Creates a new trace group. All actions between group and groupEnd will be grouped together.
|
|
64
|
-
* @param name - Group name shown in trace viewer.
|
|
65
|
-
* @param options - Optional source location for the group.
|
|
66
|
-
*
|
|
67
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-group
|
|
68
|
-
*/
|
|
69
|
-
async group(name, options) {
|
|
70
|
-
await this.rpc('tracing.group', [name, options]);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Closes the last trace group opened by tracing.group().
|
|
74
|
-
*
|
|
75
|
-
* @see https://playwright.dev/docs/api/class-tracing#tracing-group-end
|
|
76
|
-
*/
|
|
77
|
-
async groupEnd() {
|
|
78
|
-
await this.rpc('tracing.groupEnd', []);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,53 +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 { RemoteBase } from '../remote-base.js';
|
|
9
|
-
import type { RemotePlaywrightJSHandle } from './js-handle.js';
|
|
10
|
-
/**
|
|
11
|
-
* Serialized Worker data received over RPC.
|
|
12
|
-
*/
|
|
13
|
-
export interface SerializedWorker {
|
|
14
|
-
id: string;
|
|
15
|
-
url: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* RemotePlaywrightWorker - Remote Playwright Worker API over RPC.
|
|
19
|
-
*
|
|
20
|
-
* @see https://playwright.dev/docs/api/class-worker
|
|
21
|
-
*/
|
|
22
|
-
export declare class RemotePlaywrightWorker extends RemoteBase {
|
|
23
|
-
private readonly _url;
|
|
24
|
-
/** Factory to create JSHandle instances */
|
|
25
|
-
private readonly _jsHandleFactory;
|
|
26
|
-
constructor(sendRpc: SimpleRpcSender, data: SerializedWorker, jsHandleFactory: (id: string) => RemotePlaywrightJSHandle);
|
|
27
|
-
protected get jsHandleFactory(): (id: string) => RemotePlaywrightJSHandle;
|
|
28
|
-
/**
|
|
29
|
-
* Returns the URL of the worker.
|
|
30
|
-
*
|
|
31
|
-
* @see https://playwright.dev/docs/api/class-worker#worker-url
|
|
32
|
-
*/
|
|
33
|
-
url(): string;
|
|
34
|
-
/**
|
|
35
|
-
* Evaluates the given function in the worker context.
|
|
36
|
-
* @param pageFunction - Function to be evaluated in the worker context.
|
|
37
|
-
* @param arg - Optional argument to pass to the function.
|
|
38
|
-
*
|
|
39
|
-
* @see https://playwright.dev/docs/api/class-worker#worker-evaluate
|
|
40
|
-
*/
|
|
41
|
-
evaluate<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<R>;
|
|
42
|
-
/**
|
|
43
|
-
* Evaluates the given function in the worker context and returns a JSHandle.
|
|
44
|
-
* @param pageFunction - Function to be evaluated in the worker context.
|
|
45
|
-
* @param arg - Optional argument to pass to the function.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* Note: Returns serialized handle reference. Full JSHandle support not yet available.
|
|
49
|
-
*
|
|
50
|
-
* @see https://playwright.dev/docs/api/class-worker#worker-evaluate-handle
|
|
51
|
-
*/
|
|
52
|
-
evaluateHandle<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<unknown>;
|
|
53
|
-
}
|
|
@@ -1,59 +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 { RemoteBase } from '../remote-base.js';
|
|
8
|
-
import { serializeFunctionSource } from '../../../internal/transport.js';
|
|
9
|
-
/**
|
|
10
|
-
* RemotePlaywrightWorker - Remote Playwright Worker API over RPC.
|
|
11
|
-
*
|
|
12
|
-
* @see https://playwright.dev/docs/api/class-worker
|
|
13
|
-
*/
|
|
14
|
-
export class RemotePlaywrightWorker extends RemoteBase {
|
|
15
|
-
_url;
|
|
16
|
-
/** Factory to create JSHandle instances */
|
|
17
|
-
_jsHandleFactory;
|
|
18
|
-
constructor(sendRpc, data, jsHandleFactory) {
|
|
19
|
-
super(data.id, sendRpc);
|
|
20
|
-
this._url = data.url;
|
|
21
|
-
this._jsHandleFactory = jsHandleFactory;
|
|
22
|
-
}
|
|
23
|
-
get jsHandleFactory() {
|
|
24
|
-
return this._jsHandleFactory;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Returns the URL of the worker.
|
|
28
|
-
*
|
|
29
|
-
* @see https://playwright.dev/docs/api/class-worker#worker-url
|
|
30
|
-
*/
|
|
31
|
-
url() {
|
|
32
|
-
return this._url;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Evaluates the given function in the worker context.
|
|
36
|
-
* @param pageFunction - Function to be evaluated in the worker context.
|
|
37
|
-
* @param arg - Optional argument to pass to the function.
|
|
38
|
-
*
|
|
39
|
-
* @see https://playwright.dev/docs/api/class-worker#worker-evaluate
|
|
40
|
-
*/
|
|
41
|
-
async evaluate(pageFunction, arg) {
|
|
42
|
-
const _pageFunction = serializeFunctionSource(pageFunction);
|
|
43
|
-
return this.rpc('evaluate', [this.id, _pageFunction, arg]);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Evaluates the given function in the worker context and returns a JSHandle.
|
|
47
|
-
* @param pageFunction - Function to be evaluated in the worker context.
|
|
48
|
-
* @param arg - Optional argument to pass to the function.
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* Note: Returns serialized handle reference. Full JSHandle support not yet available.
|
|
52
|
-
*
|
|
53
|
-
* @see https://playwright.dev/docs/api/class-worker#worker-evaluate-handle
|
|
54
|
-
*/
|
|
55
|
-
async evaluateHandle(pageFunction, arg) {
|
|
56
|
-
const _pageFunction = serializeFunctionSource(pageFunction);
|
|
57
|
-
return this.rpc('evaluateHandle', [this.id, _pageFunction, arg]);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { RemotePlaywrightBrowser } from './generated/browser.js';
|
|
2
|
-
export { RemotePlaywrightBrowserContext } from './generated/browser-context.js';
|
|
3
|
-
export { RemotePlaywrightPage } from './generated/page.js';
|
|
4
|
-
export { RemotePlaywrightLocator } from './generated/locator.js';
|
|
5
|
-
export { RemotePlaywrightFrame } from './generated/frame.js';
|
|
6
|
-
export { RemotePlaywrightElementHandle } from './generated/element-handle.js';
|
|
7
|
-
export { RemotePlaywrightJSHandle } from './generated/js-handle.js';
|
|
8
|
-
export { RemotePlaywrightMouse } from './generated/mouse.js';
|
|
9
|
-
export { RemotePlaywrightKeyboard } from './generated/keyboard.js';
|
|
10
|
-
export { RemotePlaywrightTouchscreen } from './generated/touchscreen.js';
|
|
11
|
-
export { RemotePlaywrightDialog } from './generated/dialog.js';
|
|
12
|
-
export { RemotePlaywrightConsoleMessage } from './generated/console-message.js';
|
|
13
|
-
export { RemotePlaywrightClock } from './generated/clock.js';
|
|
14
|
-
export { RemotePlaywrightCoverage } from './generated/coverage.js';
|
|
15
|
-
export { RemotePlaywrightAPIRequestContext } from './generated/api-request-context.js';
|
|
16
|
-
export { RemotePlaywrightAPIResponse } from './generated/api-response.js';
|
|
17
|
-
export { RemotePlaywrightTracing } from './generated/tracing.js';
|
|
18
|
-
export { RemotePlaywrightWorker } from './generated/worker.js';
|
|
19
|
-
export type { PlaywrightBrowser, PlaywrightBrowserContext, PlaywrightPage, PlaywrightLocator, PlaywrightMouse, PlaywrightKeyboard, LocatorChainStep, PlaywrightNewContextOptions, PlaywrightNewPageOptions, PlaywrightGotoOptions, PlaywrightReloadOptions, PlaywrightGoBackOptions, PlaywrightGoForwardOptions, PlaywrightWaitForSelectorOptions, PlaywrightWaitForLoadStateOptions, PlaywrightWaitForURLOptions, PlaywrightPageScreenshotOptions, PlaywrightPDFOptions, PlaywrightLocatorOptions, PlaywrightLocatorFilterOptions, PlaywrightClickOptions, PlaywrightFillOptions, PlaywrightTypeOptions, PlaywrightPressOptions, PlaywrightCheckOptions, PlaywrightSelectOptionOptions, PlaywrightHoverOptions, PlaywrightFocusOptions, PlaywrightTextContentOptions, PlaywrightInnerTextOptions, PlaywrightInnerHTMLOptions, PlaywrightGetAttributeOptions, PlaywrightInputValueOptions, PlaywrightIsOptions, PlaywrightWaitForOptions, PlaywrightBoundingBoxResult, PlaywrightScreenshotOptions, PlaywrightGetByRoleOptions, PlaywrightGetByTextOptions, PlaywrightGetByLabelOptions, PlaywrightGetByPlaceholderOptions, PlaywrightGetByAltTextOptions, PlaywrightGetByTitleOptions, PlaywrightMouseClickOptions, PlaywrightMouseMoveOptions, PlaywrightKeyboardOptions, } from './types.js';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Playwright driver exports.
|
|
2
|
-
// Core Playwright components (generated)
|
|
3
|
-
export { RemotePlaywrightBrowser } from './generated/browser.js';
|
|
4
|
-
export { RemotePlaywrightBrowserContext } from './generated/browser-context.js';
|
|
5
|
-
export { RemotePlaywrightPage } from './generated/page.js';
|
|
6
|
-
export { RemotePlaywrightLocator } from './generated/locator.js';
|
|
7
|
-
export { RemotePlaywrightFrame } from './generated/frame.js';
|
|
8
|
-
export { RemotePlaywrightElementHandle } from './generated/element-handle.js';
|
|
9
|
-
export { RemotePlaywrightJSHandle } from './generated/js-handle.js';
|
|
10
|
-
export { RemotePlaywrightMouse } from './generated/mouse.js';
|
|
11
|
-
export { RemotePlaywrightKeyboard } from './generated/keyboard.js';
|
|
12
|
-
export { RemotePlaywrightTouchscreen } from './generated/touchscreen.js';
|
|
13
|
-
export { RemotePlaywrightDialog } from './generated/dialog.js';
|
|
14
|
-
export { RemotePlaywrightConsoleMessage } from './generated/console-message.js';
|
|
15
|
-
export { RemotePlaywrightClock } from './generated/clock.js';
|
|
16
|
-
export { RemotePlaywrightCoverage } from './generated/coverage.js';
|
|
17
|
-
export { RemotePlaywrightAPIRequestContext } from './generated/api-request-context.js';
|
|
18
|
-
export { RemotePlaywrightAPIResponse } from './generated/api-response.js';
|
|
19
|
-
export { RemotePlaywrightTracing } from './generated/tracing.js';
|
|
20
|
-
export { RemotePlaywrightWorker } from './generated/worker.js';
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RemoteBase - Base class for all remote Playwright objects.
|
|
3
|
-
*
|
|
4
|
-
* Provides common functionality:
|
|
5
|
-
* - Closed state tracking
|
|
6
|
-
* - RPC wrapper with closed-state checks
|
|
7
|
-
* - Common dispose/close patterns
|
|
8
|
-
*
|
|
9
|
-
* Classes that extend RemoteBase get automatic protection against
|
|
10
|
-
* calling methods on disposed/closed objects.
|
|
11
|
-
*/
|
|
12
|
-
import type { SimpleRpcSender } from '../../internal/transport.js';
|
|
13
|
-
/**
|
|
14
|
-
* Base class for remote Playwright objects that have an ID.
|
|
15
|
-
* Handles common patterns like closed-state checking and RPC wrapping.
|
|
16
|
-
*/
|
|
17
|
-
export declare class RemoteBase {
|
|
18
|
-
readonly id: string;
|
|
19
|
-
protected sendRpc: SimpleRpcSender;
|
|
20
|
-
protected _isClosed: boolean;
|
|
21
|
-
constructor(id: string, sendRpc: SimpleRpcSender);
|
|
22
|
-
/**
|
|
23
|
-
* Handle ID alias for compatibility with HasHandleId interface.
|
|
24
|
-
* Allows this object to be passed to extractHandleId().
|
|
25
|
-
*/
|
|
26
|
-
get handleId(): string;
|
|
27
|
-
/**
|
|
28
|
-
* Protected RPC wrapper that checks closed state before sending.
|
|
29
|
-
* Use this instead of sendRpc directly to get automatic closed-state protection.
|
|
30
|
-
*/
|
|
31
|
-
protected rpc<T>(method: string, args: unknown[]): Promise<T>;
|
|
32
|
-
/**
|
|
33
|
-
* Check if this object has been closed/disposed.
|
|
34
|
-
*/
|
|
35
|
-
get isClosed(): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Mark this object as closed.
|
|
38
|
-
* Called internally after close/dispose operations.
|
|
39
|
-
*/
|
|
40
|
-
protected markClosed(): void;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Base class for remote objects that don't have an ID.
|
|
44
|
-
* Used for nested components like Mouse, Keyboard that operate on their parent.
|
|
45
|
-
*/
|
|
46
|
-
export declare class RemoteComponentBase {
|
|
47
|
-
protected sendRpc: SimpleRpcSender;
|
|
48
|
-
protected _isClosed: boolean;
|
|
49
|
-
constructor(sendRpc: SimpleRpcSender);
|
|
50
|
-
/**
|
|
51
|
-
* Protected RPC wrapper that checks closed state before sending.
|
|
52
|
-
*/
|
|
53
|
-
protected rpc<T>(method: string, args: unknown[]): Promise<T>;
|
|
54
|
-
/**
|
|
55
|
-
* Check if this object has been closed/disposed.
|
|
56
|
-
*/
|
|
57
|
-
get isClosed(): boolean;
|
|
58
|
-
/**
|
|
59
|
-
* Mark this object as closed.
|
|
60
|
-
*/
|
|
61
|
-
protected markClosed(): void;
|
|
62
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RemoteBase - Base class for all remote Playwright objects.
|
|
3
|
-
*
|
|
4
|
-
* Provides common functionality:
|
|
5
|
-
* - Closed state tracking
|
|
6
|
-
* - RPC wrapper with closed-state checks
|
|
7
|
-
* - Common dispose/close patterns
|
|
8
|
-
*
|
|
9
|
-
* Classes that extend RemoteBase get automatic protection against
|
|
10
|
-
* calling methods on disposed/closed objects.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Base class for remote Playwright objects that have an ID.
|
|
14
|
-
* Handles common patterns like closed-state checking and RPC wrapping.
|
|
15
|
-
*/
|
|
16
|
-
export class RemoteBase {
|
|
17
|
-
id;
|
|
18
|
-
sendRpc;
|
|
19
|
-
_isClosed = false;
|
|
20
|
-
constructor(id, sendRpc) {
|
|
21
|
-
this.id = id;
|
|
22
|
-
this.sendRpc = sendRpc;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Handle ID alias for compatibility with HasHandleId interface.
|
|
26
|
-
* Allows this object to be passed to extractHandleId().
|
|
27
|
-
*/
|
|
28
|
-
get handleId() {
|
|
29
|
-
return this.id;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Protected RPC wrapper that checks closed state before sending.
|
|
33
|
-
* Use this instead of sendRpc directly to get automatic closed-state protection.
|
|
34
|
-
*/
|
|
35
|
-
async rpc(method, args) {
|
|
36
|
-
if (this._isClosed) {
|
|
37
|
-
throw new Error(`Cannot call ${method}: object is closed`);
|
|
38
|
-
}
|
|
39
|
-
return this.sendRpc(method, args);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Check if this object has been closed/disposed.
|
|
43
|
-
*/
|
|
44
|
-
get isClosed() {
|
|
45
|
-
return this._isClosed;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Mark this object as closed.
|
|
49
|
-
* Called internally after close/dispose operations.
|
|
50
|
-
*/
|
|
51
|
-
markClosed() {
|
|
52
|
-
this._isClosed = true;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Base class for remote objects that don't have an ID.
|
|
57
|
-
* Used for nested components like Mouse, Keyboard that operate on their parent.
|
|
58
|
-
*/
|
|
59
|
-
export class RemoteComponentBase {
|
|
60
|
-
sendRpc;
|
|
61
|
-
_isClosed = false;
|
|
62
|
-
constructor(sendRpc) {
|
|
63
|
-
this.sendRpc = sendRpc;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Protected RPC wrapper that checks closed state before sending.
|
|
67
|
-
*/
|
|
68
|
-
async rpc(method, args) {
|
|
69
|
-
if (this._isClosed) {
|
|
70
|
-
throw new Error(`Cannot call ${method}: object is closed`);
|
|
71
|
-
}
|
|
72
|
-
return this.sendRpc(method, args);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Check if this object has been closed/disposed.
|
|
76
|
-
*/
|
|
77
|
-
get isClosed() {
|
|
78
|
-
return this._isClosed;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Mark this object as closed.
|
|
82
|
-
*/
|
|
83
|
-
markClosed() {
|
|
84
|
-
this._isClosed = true;
|
|
85
|
-
}
|
|
86
|
-
}
|