@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,151 +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 { extractHandleId } from '../../../internal/transport.js';
|
|
8
|
-
import { RemoteBase } from '../remote-base.js';
|
|
9
|
-
/**
|
|
10
|
-
* RemotePlaywrightBrowser - Remote Playwright Browser API over RPC.
|
|
11
|
-
*
|
|
12
|
-
* @see https://playwright.dev/docs/api/class-browser
|
|
13
|
-
*/
|
|
14
|
-
export class RemotePlaywrightBrowser extends RemoteBase {
|
|
15
|
-
constructor(id, sendRpc, createBrowserContext, createPage) {
|
|
16
|
-
super(id, sendRpc);
|
|
17
|
-
this.createBrowserContext = createBrowserContext;
|
|
18
|
-
this.createPage = createPage;
|
|
19
|
-
}
|
|
20
|
-
_listeners = new Map();
|
|
21
|
-
createBrowserContext;
|
|
22
|
-
createPage;
|
|
23
|
-
/**
|
|
24
|
-
* Stops Chromium Tracing and returns the trace data.
|
|
25
|
-
* @remarks This is a Chromium-only API.
|
|
26
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-stop-tracing
|
|
27
|
-
*/
|
|
28
|
-
async stopTracing() {
|
|
29
|
-
const base64 = await this.sendRpc('stopTracing', [this.id]);
|
|
30
|
-
return Buffer.from(base64, 'base64');
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Removes all listeners for the specified event, or all events if no event is specified.
|
|
34
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-remove-all-listeners
|
|
35
|
-
*/
|
|
36
|
-
removeAllListeners(event) {
|
|
37
|
-
if (event === undefined) {
|
|
38
|
-
this._listeners.clear();
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this._listeners.delete(event);
|
|
42
|
-
}
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Get the browser type name (chromium, firefox, or webkit) that was used to launch this browser.
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* Note: Returns the name string. This is async in the remote SDK, unlike the native Playwright API.
|
|
50
|
-
*
|
|
51
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-browser-type
|
|
52
|
-
*/
|
|
53
|
-
async browserType() {
|
|
54
|
-
return this.rpc('browserType', []);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Returns the browser version.
|
|
58
|
-
*
|
|
59
|
-
* @remarks
|
|
60
|
-
* Note: This is async in the remote SDK, unlike the native Playwright API.
|
|
61
|
-
*
|
|
62
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-version
|
|
63
|
-
*/
|
|
64
|
-
async version() {
|
|
65
|
-
return this.rpc('version', []);
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Indicates that the browser is connected.
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
* Note: This is async in the remote SDK, unlike the native Playwright API.
|
|
72
|
-
*
|
|
73
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-is-connected
|
|
74
|
-
*/
|
|
75
|
-
async isConnected() {
|
|
76
|
-
return this.rpc('isConnected', []);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Returns an array of all open browser contexts.
|
|
80
|
-
*
|
|
81
|
-
* @remarks
|
|
82
|
-
* In a newly created browser, this will return zero browser contexts. Note: This is async in the remote SDK, unlike the native Playwright API.
|
|
83
|
-
*
|
|
84
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-contexts
|
|
85
|
-
*/
|
|
86
|
-
async contexts() {
|
|
87
|
-
const contextIds = await this.rpc('contexts', []);
|
|
88
|
-
return contextIds.map((id) => this.createBrowserContext(id));
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Creates a new browser context. It will not share cookies/cache with other browser contexts.
|
|
92
|
-
*
|
|
93
|
-
* @remarks
|
|
94
|
-
* If directly using this method to create BrowserContexts, it is best practice to explicitly close the returned context via browserContext.close() when your code is done with the BrowserContext, and before calling browser.close().
|
|
95
|
-
*
|
|
96
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-new-context
|
|
97
|
-
*/
|
|
98
|
-
async newContext(options) {
|
|
99
|
-
const contextId = await this.rpc('newContext', [options]);
|
|
100
|
-
return this.createBrowserContext(contextId);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Creates a new page in a new browser context. Closing this page will close the context as well.
|
|
104
|
-
*
|
|
105
|
-
* @remarks
|
|
106
|
-
* This is a convenience API that should only be used for single-page scenarios and short snippets. Production code and testing frameworks should explicitly create browser.newContext() followed by browserContext.newPage() to control their exact life times.
|
|
107
|
-
*
|
|
108
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-new-page
|
|
109
|
-
*/
|
|
110
|
-
async newPage(options) {
|
|
111
|
-
const pageId = await this.rpc('newPage', [options]);
|
|
112
|
-
return this.createPage(pageId);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Returns the newly created browser session.
|
|
116
|
-
*
|
|
117
|
-
* @remarks
|
|
118
|
-
* CDP Sessions are only supported on Chromium-based browsers.
|
|
119
|
-
*
|
|
120
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-new-browser-cdp-session
|
|
121
|
-
*/
|
|
122
|
-
async newBrowserCDPSession() {
|
|
123
|
-
return this.rpc('newBrowserCDPSession', []);
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Starts Chromium Tracing.
|
|
127
|
-
* @param page - Optional page to capture screenshots from.
|
|
128
|
-
* @param options - Tracing options.
|
|
129
|
-
*
|
|
130
|
-
* @remarks
|
|
131
|
-
* This is a Chromium-only API. Only one trace can be active at a time per browser.
|
|
132
|
-
*
|
|
133
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-start-tracing
|
|
134
|
-
*/
|
|
135
|
-
async startTracing(page, options) {
|
|
136
|
-
const _page = extractHandleId(page);
|
|
137
|
-
await this.rpc('startTracing', [_page, options]);
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Closes the browser and all of its pages (if any were opened).
|
|
141
|
-
*
|
|
142
|
-
* @remarks
|
|
143
|
-
* The Browser object itself is considered to be disposed and cannot be used anymore. This is similar to force-quitting the browser.
|
|
144
|
-
*
|
|
145
|
-
* @see https://playwright.dev/docs/api/class-browser#browser-close
|
|
146
|
-
*/
|
|
147
|
-
async close(options) {
|
|
148
|
-
await this.rpc('close', [options]);
|
|
149
|
-
this.markClosed();
|
|
150
|
-
}
|
|
151
|
-
}
|
|
@@ -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 type { SimpleRpcSender } from '../../../internal/transport.js';
|
|
8
|
-
import { RemoteComponentBase } from '../remote-base.js';
|
|
9
|
-
/**
|
|
10
|
-
* RemotePlaywrightClock - Remote Playwright Clock API over RPC.
|
|
11
|
-
*
|
|
12
|
-
* @see https://playwright.dev/docs/api/class-clock
|
|
13
|
-
*/
|
|
14
|
-
export declare class RemotePlaywrightClock extends RemoteComponentBase {
|
|
15
|
-
/** Parent context ID */
|
|
16
|
-
private readonly _contextId;
|
|
17
|
-
constructor(sendRpc: SimpleRpcSender, contextId: string);
|
|
18
|
-
/**
|
|
19
|
-
* Install fake implementations for time-related functions.
|
|
20
|
-
* @param options - Optional time to initialize the clock with.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* Once installed, you can control time with other clock methods. Automatically uninstalled on context/page close.
|
|
24
|
-
*
|
|
25
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-install
|
|
26
|
-
*/
|
|
27
|
-
install(options?: {
|
|
28
|
-
time?: number | string | Date;
|
|
29
|
-
}): Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* Makes Date.now() and new Date() return a fixed fake time.
|
|
32
|
-
* @param time - Time to set (milliseconds, date string, or Date object).
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* Keeps all timers running. Use for simple scenarios where you only need a predefined time.
|
|
36
|
-
*
|
|
37
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-set-fixed-time
|
|
38
|
-
*/
|
|
39
|
-
setFixedTime(time: number | string | Date): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Sets current system time but does not trigger any timers.
|
|
42
|
-
* @param time - Time to set (milliseconds, date string, or Date object).
|
|
43
|
-
*
|
|
44
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-set-system-time
|
|
45
|
-
*/
|
|
46
|
-
setSystemTime(time: number | string | Date): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Advances the clock by specified time, firing all timers in the process.
|
|
49
|
-
* @param ticks - Time to advance (milliseconds or string like "01:30").
|
|
50
|
-
*
|
|
51
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-run-for
|
|
52
|
-
*/
|
|
53
|
-
runFor(ticks: number | string): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Advances the clock by jumping forward in time and pause the time.
|
|
56
|
-
* @param time - Time to pause at.
|
|
57
|
-
*
|
|
58
|
-
* @remarks
|
|
59
|
-
* Once paused, use fastForward or runFor to resume.
|
|
60
|
-
*
|
|
61
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-pause-at
|
|
62
|
-
*/
|
|
63
|
-
pauseAt(time: number | string | Date): Promise<void>;
|
|
64
|
-
/**
|
|
65
|
-
* Resumes timers that were paused.
|
|
66
|
-
*
|
|
67
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-resume
|
|
68
|
-
*/
|
|
69
|
-
resume(): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Advances the clock by jumping forward in time.
|
|
72
|
-
* @param ticks - Time to advance (milliseconds or string like "01:30").
|
|
73
|
-
*
|
|
74
|
-
* @remarks
|
|
75
|
-
* Only fires due timers, unlike runFor which fires all timers.
|
|
76
|
-
*
|
|
77
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-fast-forward
|
|
78
|
-
*/
|
|
79
|
-
fastForward(ticks: number | string): Promise<void>;
|
|
80
|
-
}
|
|
@@ -1,94 +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
|
-
* RemotePlaywrightClock - Remote Playwright Clock API over RPC.
|
|
10
|
-
*
|
|
11
|
-
* @see https://playwright.dev/docs/api/class-clock
|
|
12
|
-
*/
|
|
13
|
-
export class RemotePlaywrightClock extends RemoteComponentBase {
|
|
14
|
-
/** Parent context ID */
|
|
15
|
-
_contextId;
|
|
16
|
-
constructor(sendRpc, contextId) {
|
|
17
|
-
super(sendRpc);
|
|
18
|
-
this._contextId = contextId;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Install fake implementations for time-related functions.
|
|
22
|
-
* @param options - Optional time to initialize the clock with.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* Once installed, you can control time with other clock methods. Automatically uninstalled on context/page close.
|
|
26
|
-
*
|
|
27
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-install
|
|
28
|
-
*/
|
|
29
|
-
async install(options) {
|
|
30
|
-
await this.rpc('clock.install', [options]);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Makes Date.now() and new Date() return a fixed fake time.
|
|
34
|
-
* @param time - Time to set (milliseconds, date string, or Date object).
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* Keeps all timers running. Use for simple scenarios where you only need a predefined time.
|
|
38
|
-
*
|
|
39
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-set-fixed-time
|
|
40
|
-
*/
|
|
41
|
-
async setFixedTime(time) {
|
|
42
|
-
await this.rpc('clock.setFixedTime', [time]);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Sets current system time but does not trigger any timers.
|
|
46
|
-
* @param time - Time to set (milliseconds, date string, or Date object).
|
|
47
|
-
*
|
|
48
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-set-system-time
|
|
49
|
-
*/
|
|
50
|
-
async setSystemTime(time) {
|
|
51
|
-
await this.rpc('clock.setSystemTime', [time]);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Advances the clock by specified time, firing all timers in the process.
|
|
55
|
-
* @param ticks - Time to advance (milliseconds or string like "01:30").
|
|
56
|
-
*
|
|
57
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-run-for
|
|
58
|
-
*/
|
|
59
|
-
async runFor(ticks) {
|
|
60
|
-
await this.rpc('clock.runFor', [ticks]);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Advances the clock by jumping forward in time and pause the time.
|
|
64
|
-
* @param time - Time to pause at.
|
|
65
|
-
*
|
|
66
|
-
* @remarks
|
|
67
|
-
* Once paused, use fastForward or runFor to resume.
|
|
68
|
-
*
|
|
69
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-pause-at
|
|
70
|
-
*/
|
|
71
|
-
async pauseAt(time) {
|
|
72
|
-
await this.rpc('clock.pauseAt', [time]);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Resumes timers that were paused.
|
|
76
|
-
*
|
|
77
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-resume
|
|
78
|
-
*/
|
|
79
|
-
async resume() {
|
|
80
|
-
await this.rpc('clock.resume', []);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Advances the clock by jumping forward in time.
|
|
84
|
-
* @param ticks - Time to advance (milliseconds or string like "01:30").
|
|
85
|
-
*
|
|
86
|
-
* @remarks
|
|
87
|
-
* Only fires due timers, unlike runFor which fires all timers.
|
|
88
|
-
*
|
|
89
|
-
* @see https://playwright.dev/docs/api/class-clock#clock-fast-forward
|
|
90
|
-
*/
|
|
91
|
-
async fastForward(ticks) {
|
|
92
|
-
await this.rpc('clock.fastForward', [ticks]);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
@@ -1,94 +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 type { PlaywrightConsoleMessageLocation, PlaywrightConsoleMessageType } from '../types.js';
|
|
9
|
-
import type { RemotePlaywrightJSHandle } from './js-handle.js';
|
|
10
|
-
import type { RemotePlaywrightPage } from './page.js';
|
|
11
|
-
import type { RemotePlaywrightWorker } from './worker.js';
|
|
12
|
-
/**
|
|
13
|
-
* Serialized ConsoleMessage data received over RPC.
|
|
14
|
-
*/
|
|
15
|
-
export interface SerializedConsoleMessage {
|
|
16
|
-
/** Serialized JSHandle references for args */
|
|
17
|
-
args: Array<{
|
|
18
|
-
id: string;
|
|
19
|
-
handleType: string;
|
|
20
|
-
}>;
|
|
21
|
-
/** Source location */
|
|
22
|
-
location: PlaywrightConsoleMessageLocation;
|
|
23
|
-
/** Page ID or null */
|
|
24
|
-
pageId: string | null;
|
|
25
|
-
/** Message text */
|
|
26
|
-
text: string;
|
|
27
|
-
/** Message type */
|
|
28
|
-
type: PlaywrightConsoleMessageType;
|
|
29
|
-
/** Worker ID or null */
|
|
30
|
-
workerId: string | null;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* RemotePlaywrightConsoleMessage - Remote Playwright ConsoleMessage API over RPC.
|
|
34
|
-
*
|
|
35
|
-
* @see https://playwright.dev/docs/api/class-consolemessage
|
|
36
|
-
*/
|
|
37
|
-
export declare class RemotePlaywrightConsoleMessage {
|
|
38
|
-
private sendRpc;
|
|
39
|
-
private readonly _text;
|
|
40
|
-
private readonly _type;
|
|
41
|
-
private readonly _location;
|
|
42
|
-
constructor(sendRpc: SimpleRpcSender, data: SerializedConsoleMessage, createJSHandle: (id: string) => RemotePlaywrightJSHandle, createPage: (id: string) => RemotePlaywrightPage, createWorker: (id: string) => RemotePlaywrightWorker);
|
|
43
|
-
private readonly _args;
|
|
44
|
-
private readonly _page;
|
|
45
|
-
private readonly _worker;
|
|
46
|
-
/**
|
|
47
|
-
* List of arguments passed to a console function call.
|
|
48
|
-
*
|
|
49
|
-
* @remarks
|
|
50
|
-
* Each argument is a JSHandle that can be evaluated to retrieve its value.
|
|
51
|
-
*
|
|
52
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-args
|
|
53
|
-
*/
|
|
54
|
-
args(): RemotePlaywrightJSHandle[];
|
|
55
|
-
/**
|
|
56
|
-
* Source location of the console message.
|
|
57
|
-
*
|
|
58
|
-
* @remarks
|
|
59
|
-
* Returns URL, line number, and column number (0-based) where the message originated.
|
|
60
|
-
*
|
|
61
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-location
|
|
62
|
-
*/
|
|
63
|
-
location(): PlaywrightConsoleMessageLocation;
|
|
64
|
-
/**
|
|
65
|
-
* The page that produced this console message, if any.
|
|
66
|
-
*
|
|
67
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-page
|
|
68
|
-
*/
|
|
69
|
-
page(): RemotePlaywrightPage | null;
|
|
70
|
-
/**
|
|
71
|
-
* The text of the console message.
|
|
72
|
-
*
|
|
73
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-text
|
|
74
|
-
*/
|
|
75
|
-
text(): string;
|
|
76
|
-
/**
|
|
77
|
-
* The type of the console message.
|
|
78
|
-
*
|
|
79
|
-
* @remarks
|
|
80
|
-
* One of 'log', 'debug', 'info', 'error', 'warning', 'dir', 'dirxml', 'table', 'trace', 'clear', 'startGroup', 'startGroupCollapsed', 'endGroup', 'assert', 'profile', 'profileEnd', 'count', 'timeEnd'.
|
|
81
|
-
*
|
|
82
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-type
|
|
83
|
-
*/
|
|
84
|
-
type(): PlaywrightConsoleMessageType;
|
|
85
|
-
/**
|
|
86
|
-
* The web worker or service worker that produced this console message, if any.
|
|
87
|
-
*
|
|
88
|
-
* @remarks
|
|
89
|
-
* Console messages from web workers have both non-null worker and page properties.
|
|
90
|
-
*
|
|
91
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-worker
|
|
92
|
-
*/
|
|
93
|
-
worker(): RemotePlaywrightWorker | null;
|
|
94
|
-
}
|
|
@@ -1,89 +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
|
-
/**
|
|
8
|
-
* RemotePlaywrightConsoleMessage - Remote Playwright ConsoleMessage API over RPC.
|
|
9
|
-
*
|
|
10
|
-
* @see https://playwright.dev/docs/api/class-consolemessage
|
|
11
|
-
*/
|
|
12
|
-
export class RemotePlaywrightConsoleMessage {
|
|
13
|
-
sendRpc;
|
|
14
|
-
_text;
|
|
15
|
-
_type;
|
|
16
|
-
_location;
|
|
17
|
-
constructor(sendRpc, data, createJSHandle, createPage, createWorker) {
|
|
18
|
-
this.sendRpc = sendRpc;
|
|
19
|
-
this._text = data.text;
|
|
20
|
-
this._type = data.type;
|
|
21
|
-
this._location = data.location;
|
|
22
|
-
this._args = data.args.map(h => createJSHandle(h.id));
|
|
23
|
-
this._page = data.pageId ? createPage(data.pageId) : null;
|
|
24
|
-
this._worker = data.workerId ? createWorker(data.workerId) : null;
|
|
25
|
-
}
|
|
26
|
-
_args;
|
|
27
|
-
_page;
|
|
28
|
-
_worker;
|
|
29
|
-
/**
|
|
30
|
-
* List of arguments passed to a console function call.
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Each argument is a JSHandle that can be evaluated to retrieve its value.
|
|
34
|
-
*
|
|
35
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-args
|
|
36
|
-
*/
|
|
37
|
-
args() {
|
|
38
|
-
return this._args;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Source location of the console message.
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
* Returns URL, line number, and column number (0-based) where the message originated.
|
|
45
|
-
*
|
|
46
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-location
|
|
47
|
-
*/
|
|
48
|
-
location() {
|
|
49
|
-
return this._location;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* The page that produced this console message, if any.
|
|
53
|
-
*
|
|
54
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-page
|
|
55
|
-
*/
|
|
56
|
-
page() {
|
|
57
|
-
return this._page;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* The text of the console message.
|
|
61
|
-
*
|
|
62
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-text
|
|
63
|
-
*/
|
|
64
|
-
text() {
|
|
65
|
-
return this._text;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* The type of the console message.
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
* One of 'log', 'debug', 'info', 'error', 'warning', 'dir', 'dirxml', 'table', 'trace', 'clear', 'startGroup', 'startGroupCollapsed', 'endGroup', 'assert', 'profile', 'profileEnd', 'count', 'timeEnd'.
|
|
72
|
-
*
|
|
73
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-type
|
|
74
|
-
*/
|
|
75
|
-
type() {
|
|
76
|
-
return this._type;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* The web worker or service worker that produced this console message, if any.
|
|
80
|
-
*
|
|
81
|
-
* @remarks
|
|
82
|
-
* Console messages from web workers have both non-null worker and page properties.
|
|
83
|
-
*
|
|
84
|
-
* @see https://playwright.dev/docs/api/class-consolemessage#console-message-worker
|
|
85
|
-
*/
|
|
86
|
-
worker() {
|
|
87
|
-
return this._worker;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
@@ -1,57 +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 { PlaywrightCSSCoverageEntry, PlaywrightJSCoverageEntry, PlaywrightStartCSSCoverageOptions, PlaywrightStartJSCoverageOptions } from '../types.js';
|
|
10
|
-
/**
|
|
11
|
-
* RemotePlaywrightCoverage - Remote Playwright Coverage API over RPC.
|
|
12
|
-
*
|
|
13
|
-
* @see https://playwright.dev/docs/api/class-coverage
|
|
14
|
-
*/
|
|
15
|
-
export declare class RemotePlaywrightCoverage extends RemoteComponentBase {
|
|
16
|
-
/** Parent page ID */
|
|
17
|
-
private readonly _pageId;
|
|
18
|
-
constructor(sendRpc: SimpleRpcSender, pageId: string);
|
|
19
|
-
/**
|
|
20
|
-
* Starts CSS coverage collection.
|
|
21
|
-
* @param options - Coverage options.
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* CSS coverage does not include dynamically injected style tags without sourceURLs.
|
|
25
|
-
*
|
|
26
|
-
* @see https://playwright.dev/docs/api/class-coverage#coverage-start-css-coverage
|
|
27
|
-
*/
|
|
28
|
-
startCSSCoverage(options?: PlaywrightStartCSSCoverageOptions): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Stops CSS coverage collection and returns the coverage reports.
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Returns coverage data for all stylesheets, including URL, content, and used ranges.
|
|
34
|
-
*
|
|
35
|
-
* @see https://playwright.dev/docs/api/class-coverage#coverage-stop-css-coverage
|
|
36
|
-
*/
|
|
37
|
-
stopCSSCoverage(): Promise<PlaywrightCSSCoverageEntry[]>;
|
|
38
|
-
/**
|
|
39
|
-
* Starts JavaScript coverage collection.
|
|
40
|
-
* @param options - Coverage options.
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* Anonymous scripts are not included by default. Scripts with sourceURLs are reported.
|
|
44
|
-
*
|
|
45
|
-
* @see https://playwright.dev/docs/api/class-coverage#coverage-start-js-coverage
|
|
46
|
-
*/
|
|
47
|
-
startJSCoverage(options?: PlaywrightStartJSCoverageOptions): Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* Stops JavaScript coverage collection and returns the coverage reports.
|
|
50
|
-
*
|
|
51
|
-
* @remarks
|
|
52
|
-
* Returns V8-specific coverage format for all scripts.
|
|
53
|
-
*
|
|
54
|
-
* @see https://playwright.dev/docs/api/class-coverage#coverage-stop-js-coverage
|
|
55
|
-
*/
|
|
56
|
-
stopJSCoverage(): Promise<PlaywrightJSCoverageEntry[]>;
|
|
57
|
-
}
|
|
@@ -1,66 +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
|
-
* RemotePlaywrightCoverage - Remote Playwright Coverage API over RPC.
|
|
10
|
-
*
|
|
11
|
-
* @see https://playwright.dev/docs/api/class-coverage
|
|
12
|
-
*/
|
|
13
|
-
export class RemotePlaywrightCoverage extends RemoteComponentBase {
|
|
14
|
-
/** Parent page ID */
|
|
15
|
-
_pageId;
|
|
16
|
-
constructor(sendRpc, pageId) {
|
|
17
|
-
super(sendRpc);
|
|
18
|
-
this._pageId = pageId;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Starts CSS coverage collection.
|
|
22
|
-
* @param options - Coverage options.
|
|
23
|
-
*
|
|
24
|
-
* @remarks
|
|
25
|
-
* CSS coverage does not include dynamically injected style tags without sourceURLs.
|
|
26
|
-
*
|
|
27
|
-
* @see https://playwright.dev/docs/api/class-coverage#coverage-start-css-coverage
|
|
28
|
-
*/
|
|
29
|
-
async startCSSCoverage(options) {
|
|
30
|
-
await this.rpc('coverage.startCSSCoverage', [options]);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Stops CSS coverage collection and returns the coverage reports.
|
|
34
|
-
*
|
|
35
|
-
* @remarks
|
|
36
|
-
* Returns coverage data for all stylesheets, including URL, content, and used ranges.
|
|
37
|
-
*
|
|
38
|
-
* @see https://playwright.dev/docs/api/class-coverage#coverage-stop-css-coverage
|
|
39
|
-
*/
|
|
40
|
-
async stopCSSCoverage() {
|
|
41
|
-
return this.rpc('coverage.stopCSSCoverage', []);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Starts JavaScript coverage collection.
|
|
45
|
-
* @param options - Coverage options.
|
|
46
|
-
*
|
|
47
|
-
* @remarks
|
|
48
|
-
* Anonymous scripts are not included by default. Scripts with sourceURLs are reported.
|
|
49
|
-
*
|
|
50
|
-
* @see https://playwright.dev/docs/api/class-coverage#coverage-start-js-coverage
|
|
51
|
-
*/
|
|
52
|
-
async startJSCoverage(options) {
|
|
53
|
-
await this.rpc('coverage.startJSCoverage', [options]);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Stops JavaScript coverage collection and returns the coverage reports.
|
|
57
|
-
*
|
|
58
|
-
* @remarks
|
|
59
|
-
* Returns V8-specific coverage format for all scripts.
|
|
60
|
-
*
|
|
61
|
-
* @see https://playwright.dev/docs/api/class-coverage#coverage-stop-js-coverage
|
|
62
|
-
*/
|
|
63
|
-
async stopJSCoverage() {
|
|
64
|
-
return this.rpc('coverage.stopJSCoverage', []);
|
|
65
|
-
}
|
|
66
|
-
}
|