selenium-webdriver 4.48.0 → 4.50.0
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/CHANGES.md +26 -0
- package/bidi/generated/bluetooth.d.ts +199 -37
- package/bidi/generated/bluetooth.js +212 -106
- package/bidi/generated/browser.d.ts +81 -28
- package/bidi/generated/browser.js +97 -69
- package/bidi/generated/browsing_context.d.ts +274 -87
- package/bidi/generated/browsing_context.js +328 -241
- package/bidi/generated/common.d.ts +105 -21
- package/bidi/generated/common.js +64 -15
- package/bidi/generated/digital_credentials.d.ts +41 -0
- package/bidi/generated/digital_credentials.js +54 -0
- package/bidi/generated/emulation.d.ts +354 -58
- package/bidi/generated/emulation.js +262 -101
- package/bidi/generated/input.d.ts +63 -35
- package/bidi/generated/input.js +77 -51
- package/bidi/generated/log.d.ts +39 -18
- package/bidi/generated/log.js +23 -43
- package/bidi/generated/network.d.ts +248 -76
- package/bidi/generated/network.js +247 -181
- package/bidi/generated/permissions.d.ts +22 -4
- package/bidi/generated/permissions.js +31 -17
- package/bidi/generated/script.d.ts +166 -70
- package/bidi/generated/script.js +203 -116
- package/bidi/generated/session.d.ts +76 -36
- package/bidi/generated/session.js +81 -48
- package/bidi/generated/speculation.d.ts +15 -5
- package/bidi/generated/speculation.js +20 -16
- package/bidi/generated/storage.d.ts +41 -17
- package/bidi/generated/storage.js +58 -40
- package/bidi/generated/user_agent_client_hints.d.ts +25 -13
- package/bidi/generated/user_agent_client_hints.js +29 -18
- package/bidi/generated/webextension.d.ts +24 -10
- package/bidi/generated/webextension.js +39 -25
- package/bidi/serialization/enum.js +6 -3
- package/bidi/serialization/record.js +34 -29
- package/bin/linux-arm64/selenium-manager +0 -0
- package/bin/{linux → linux-x86_64}/selenium-manager +0 -0
- package/bin/macos/selenium-manager +0 -0
- package/bin/selenium-manager-THIRD-PARTY-NOTICES.txt +327 -51
- package/bin/selenium-manager.cdx.json +491 -491
- package/bin/windows/selenium-manager.exe +0 -0
- package/chromium.js +1 -1
- package/common/seleniumManager.js +2 -2
- package/eslint.config.js +2 -1
- package/example/chrome_mobile_emulation.js +1 -1
- package/firefox.js +7 -104
- package/index.js +8 -0
- package/lib/atoms/find-elements.js +14 -2
- package/package.json +10 -10
- package/remote/index.js +12 -3
- package/remote/util.js +5 -5
- package/testing/index.js +84 -1
|
@@ -17,27 +17,41 @@
|
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.Permissions = void 0;
|
|
20
|
+
// DO NOT EDIT! This file is generated by javascript/selenium-webdriver/generate_bidi.mjs.
|
|
21
|
+
// Regenerate with: `bazel build //javascript/selenium-webdriver:create-bidi-src`
|
|
22
|
+
// Built from the WebDriver BiDi CDDL spec (v1.0).
|
|
23
|
+
// Source: https://github.com/w3c/webref/tree/main/ed/cddl
|
|
24
|
+
const record_js_1 = require("../serialization/record.js");
|
|
25
|
+
const enum_js_1 = require("../serialization/enum.js");
|
|
26
|
+
const domain_js_1 = require("../domain.js");
|
|
27
|
+
const PermissionsPermissionDescriptor = (0, record_js_1.defineRecord)('permissions.PermissionDescriptor', [{ "name": "name", "wire": "name", "required": true, "type": { "primitive": "string" } }]);
|
|
28
|
+
const PermissionsPermissionStateEnum = (0, enum_js_1.defineEnum)('permissions.PermissionState', ["granted", "denied", "prompt"]);
|
|
29
|
+
const PermissionsSetPermission = (0, record_js_1.defineRecord)('permissions.setPermission', [{ "name": "method", "wire": "method", "required": true, "type": { "const": "permissions.setPermission" } }, { "name": "params", "wire": "params", "required": true, "type": { "ref": "permissions.SetPermissionParameters" } }]);
|
|
30
|
+
const PermissionsSetPermissionParameters = (0, record_js_1.defineRecord)('permissions.SetPermissionParameters', [{ "name": "descriptor", "wire": "descriptor", "required": true, "type": { "ref": "permissions.PermissionDescriptor" } }, { "name": "state", "wire": "state", "required": true, "type": { "ref": "permissions.PermissionState" } }, { "name": "origin", "wire": "origin", "required": true, "type": { "primitive": "string" } }, { "name": "embeddedOrigin", "wire": "embeddedOrigin", "required": false, "type": { "primitive": "string" } }, { "name": "userContext", "wire": "userContext", "required": false, "type": { "primitive": "string" } }]);
|
|
20
31
|
// --- Implementation ---
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
/**
|
|
33
|
+
* This is an unsupported API. No compatibility guarantees are provided.
|
|
34
|
+
* It tracks the W3C WebDriver BiDi specification directly. As the specification
|
|
35
|
+
* evolves, this API will change or be removed without prior notice.
|
|
36
|
+
*/
|
|
37
|
+
class Permissions extends domain_js_1.Domain {
|
|
25
38
|
static async create(driver) {
|
|
26
|
-
|
|
27
|
-
if (!caps.get('webSocketUrl')) {
|
|
28
|
-
throw new Error('WebDriver instance must support BiDi protocol');
|
|
29
|
-
}
|
|
30
|
-
const bidi = await driver.getBidi();
|
|
31
|
-
return new Permissions(bidi);
|
|
39
|
+
return new Permissions(await domain_js_1.Domain.connect(driver), domain_js_1.DOMAIN_TOKEN);
|
|
32
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* @param {PermissionsSetPermissionParameters} params
|
|
43
|
+
* @param {PermissionsPermissionDescriptor} params.descriptor
|
|
44
|
+
* @param {PermissionsPermissionState} params.state
|
|
45
|
+
* @param {string} params.origin
|
|
46
|
+
* @param {string} [params.embeddedOrigin]
|
|
47
|
+
* @param {string} [params.userContext]
|
|
48
|
+
* @returns {Promise<void>}
|
|
49
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-permissions-setPermission
|
|
50
|
+
*/
|
|
33
51
|
async setPermission(params) {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
params: params,
|
|
37
|
-
});
|
|
38
|
-
if (response['type'] === 'error') {
|
|
39
|
-
throw new Error(`${response['error']}: ${response['message']}`);
|
|
40
|
-
}
|
|
52
|
+
const validatedParams = new PermissionsSetPermissionParameters(params);
|
|
53
|
+
await this.send('permissions.setPermission', validatedParams);
|
|
41
54
|
}
|
|
42
55
|
}
|
|
43
56
|
exports.Permissions = Permissions;
|
|
57
|
+
Permissions.PermissionState = Object.freeze({ GRANTED: "granted", DENIED: "denied", PROMPT: "prompt" });
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { BrowserUserContext } from './browser.js';
|
|
2
|
+
import './browser.js';
|
|
2
3
|
import type { BrowsingContextBrowsingContext } from './browsing_context.js';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import './browsing_context.js';
|
|
5
|
+
import type { EmptyResult, JsUint } from './common.js';
|
|
6
|
+
import './common.js';
|
|
7
|
+
import { Domain, type EventDescriptor } from '../domain.js';
|
|
7
8
|
export type ScriptChannel = string;
|
|
8
9
|
export interface ScriptChannelValue {
|
|
9
10
|
type: "channel";
|
|
@@ -35,7 +36,7 @@ export interface ScriptExceptionDetails {
|
|
|
35
36
|
export type ScriptHandle = string;
|
|
36
37
|
export type ScriptInternalId = string;
|
|
37
38
|
export type ScriptLocalValue = ScriptRemoteReference | ScriptPrimitiveProtocolValue | ScriptChannelValue | ScriptArrayLocalValue | ScriptDateLocalValue | ScriptMapLocalValue | ScriptObjectLocalValue | ScriptRegExpLocalValue | ScriptSetLocalValue;
|
|
38
|
-
export type ScriptListLocalValue = ScriptLocalValue
|
|
39
|
+
export type ScriptListLocalValue = Array<ScriptLocalValue>;
|
|
39
40
|
export interface ScriptArrayLocalValue {
|
|
40
41
|
type: "array";
|
|
41
42
|
value: ScriptListLocalValue;
|
|
@@ -44,7 +45,7 @@ export interface ScriptDateLocalValue {
|
|
|
44
45
|
type: "date";
|
|
45
46
|
value: string;
|
|
46
47
|
}
|
|
47
|
-
export type ScriptMappingLocalValue =
|
|
48
|
+
export type ScriptMappingLocalValue = Array<Array<ScriptLocalValue | string>>;
|
|
48
49
|
export interface ScriptMapLocalValue {
|
|
49
50
|
type: "map";
|
|
50
51
|
value: ScriptMappingLocalValue;
|
|
@@ -81,7 +82,7 @@ export interface ScriptStringValue {
|
|
|
81
82
|
export type ScriptSpecialNumber = "NaN" | "-0" | "Infinity" | "-Infinity";
|
|
82
83
|
export interface ScriptNumberValue {
|
|
83
84
|
type: "number";
|
|
84
|
-
value:
|
|
85
|
+
value: number | ScriptSpecialNumber;
|
|
85
86
|
}
|
|
86
87
|
export interface ScriptBooleanValue {
|
|
87
88
|
type: "boolean";
|
|
@@ -96,47 +97,63 @@ export interface ScriptBaseRealmInfo {
|
|
|
96
97
|
realm: ScriptRealm;
|
|
97
98
|
origin: string;
|
|
98
99
|
}
|
|
99
|
-
export
|
|
100
|
+
export interface ScriptWindowRealmInfo {
|
|
101
|
+
realm: ScriptRealm;
|
|
102
|
+
origin: string;
|
|
100
103
|
type: "window";
|
|
101
104
|
context: BrowsingContextBrowsingContext;
|
|
102
105
|
userContext?: BrowserUserContext;
|
|
103
106
|
sandbox?: string;
|
|
104
|
-
}
|
|
105
|
-
export
|
|
107
|
+
}
|
|
108
|
+
export interface ScriptDedicatedWorkerRealmInfo {
|
|
109
|
+
realm: ScriptRealm;
|
|
110
|
+
origin: string;
|
|
106
111
|
type: "dedicated-worker";
|
|
107
|
-
owners: ScriptRealm
|
|
108
|
-
}
|
|
109
|
-
export
|
|
112
|
+
owners: Array<ScriptRealm>;
|
|
113
|
+
}
|
|
114
|
+
export interface ScriptSharedWorkerRealmInfo {
|
|
115
|
+
realm: ScriptRealm;
|
|
116
|
+
origin: string;
|
|
110
117
|
type: "shared-worker";
|
|
111
|
-
}
|
|
112
|
-
export
|
|
118
|
+
}
|
|
119
|
+
export interface ScriptServiceWorkerRealmInfo {
|
|
120
|
+
realm: ScriptRealm;
|
|
121
|
+
origin: string;
|
|
113
122
|
type: "service-worker";
|
|
114
|
-
}
|
|
115
|
-
export
|
|
123
|
+
}
|
|
124
|
+
export interface ScriptWorkerRealmInfo {
|
|
125
|
+
realm: ScriptRealm;
|
|
126
|
+
origin: string;
|
|
116
127
|
type: "worker";
|
|
117
|
-
}
|
|
118
|
-
export
|
|
128
|
+
}
|
|
129
|
+
export interface ScriptPaintWorkletRealmInfo {
|
|
130
|
+
realm: ScriptRealm;
|
|
131
|
+
origin: string;
|
|
119
132
|
type: "paint-worklet";
|
|
120
|
-
}
|
|
121
|
-
export
|
|
133
|
+
}
|
|
134
|
+
export interface ScriptAudioWorkletRealmInfo {
|
|
135
|
+
realm: ScriptRealm;
|
|
136
|
+
origin: string;
|
|
122
137
|
type: "audio-worklet";
|
|
123
|
-
}
|
|
124
|
-
export
|
|
138
|
+
}
|
|
139
|
+
export interface ScriptWorkletRealmInfo {
|
|
140
|
+
realm: ScriptRealm;
|
|
141
|
+
origin: string;
|
|
125
142
|
type: "worklet";
|
|
126
|
-
}
|
|
143
|
+
}
|
|
127
144
|
export type ScriptRealmType = "window" | "dedicated-worker" | "shared-worker" | "service-worker" | "worker" | "paint-worklet" | "audio-worklet" | "worklet";
|
|
128
145
|
export type ScriptRemoteReference = ScriptSharedReference | ScriptRemoteObjectReference;
|
|
129
|
-
export
|
|
146
|
+
export interface ScriptSharedReference {
|
|
130
147
|
sharedId: ScriptSharedId;
|
|
131
148
|
handle?: ScriptHandle;
|
|
132
|
-
}
|
|
133
|
-
export
|
|
149
|
+
}
|
|
150
|
+
export interface ScriptRemoteObjectReference {
|
|
134
151
|
handle: ScriptHandle;
|
|
135
152
|
sharedId?: ScriptSharedId;
|
|
136
|
-
}
|
|
153
|
+
}
|
|
137
154
|
export type ScriptRemoteValue = ScriptPrimitiveProtocolValue | ScriptSymbolRemoteValue | ScriptArrayRemoteValue | ScriptObjectRemoteValue | ScriptFunctionRemoteValue | ScriptRegExpRemoteValue | ScriptDateRemoteValue | ScriptMapRemoteValue | ScriptSetRemoteValue | ScriptWeakMapRemoteValue | ScriptWeakSetRemoteValue | ScriptGeneratorRemoteValue | ScriptErrorRemoteValue | ScriptProxyRemoteValue | ScriptPromiseRemoteValue | ScriptTypedArrayRemoteValue | ScriptArrayBufferRemoteValue | ScriptNodeListRemoteValue | ScriptHtmlCollectionRemoteValue | ScriptNodeRemoteValue | ScriptWindowProxyRemoteValue;
|
|
138
|
-
export type ScriptListRemoteValue = ScriptRemoteValue
|
|
139
|
-
export type ScriptMappingRemoteValue =
|
|
155
|
+
export type ScriptListRemoteValue = Array<ScriptRemoteValue>;
|
|
156
|
+
export type ScriptMappingRemoteValue = Array<Array<ScriptRemoteValue | string>>;
|
|
140
157
|
export interface ScriptSymbolRemoteValue {
|
|
141
158
|
type: "symbol";
|
|
142
159
|
handle?: ScriptHandle;
|
|
@@ -159,14 +176,18 @@ export interface ScriptFunctionRemoteValue {
|
|
|
159
176
|
handle?: ScriptHandle;
|
|
160
177
|
internalId?: ScriptInternalId;
|
|
161
178
|
}
|
|
162
|
-
export
|
|
179
|
+
export interface ScriptRegExpRemoteValue {
|
|
180
|
+
type: "regexp";
|
|
181
|
+
value: ScriptRegExpValue;
|
|
163
182
|
handle?: ScriptHandle;
|
|
164
183
|
internalId?: ScriptInternalId;
|
|
165
|
-
}
|
|
166
|
-
export
|
|
184
|
+
}
|
|
185
|
+
export interface ScriptDateRemoteValue {
|
|
186
|
+
type: "date";
|
|
187
|
+
value: string;
|
|
167
188
|
handle?: ScriptHandle;
|
|
168
189
|
internalId?: ScriptInternalId;
|
|
169
|
-
}
|
|
190
|
+
}
|
|
170
191
|
export interface ScriptMapRemoteValue {
|
|
171
192
|
type: "map";
|
|
172
193
|
handle?: ScriptHandle;
|
|
@@ -241,11 +262,11 @@ export interface ScriptNodeRemoteValue {
|
|
|
241
262
|
export interface ScriptNodeProperties {
|
|
242
263
|
nodeType: JsUint;
|
|
243
264
|
childNodeCount: JsUint;
|
|
244
|
-
attributes?:
|
|
245
|
-
children?: ScriptNodeRemoteValue
|
|
265
|
+
attributes?: ScriptNodePropertiesAttributes;
|
|
266
|
+
children?: Array<ScriptNodeRemoteValue>;
|
|
246
267
|
localName?: string;
|
|
247
|
-
mode?:
|
|
248
|
-
|
|
268
|
+
mode?: ScriptNodePropertiesMode;
|
|
269
|
+
namespaceURI?: string;
|
|
249
270
|
nodeValue?: string;
|
|
250
271
|
shadowRoot?: ScriptNodeRemoteValue | null;
|
|
251
272
|
}
|
|
@@ -261,14 +282,8 @@ export interface ScriptWindowProxyProperties {
|
|
|
261
282
|
export type ScriptResultOwnership = "root" | "none";
|
|
262
283
|
export interface ScriptSerializationOptions {
|
|
263
284
|
maxDomDepth?: JsUint | null;
|
|
264
|
-
/**
|
|
265
|
-
* @default null
|
|
266
|
-
*/
|
|
267
285
|
maxObjectDepth?: JsUint | null;
|
|
268
|
-
|
|
269
|
-
* @default 'none'
|
|
270
|
-
*/
|
|
271
|
-
includeShadowTree?: "none" | "open" | "all";
|
|
286
|
+
includeShadowTree?: ScriptSerializationOptionsIncludeShadowTree;
|
|
272
287
|
}
|
|
273
288
|
export type ScriptSharedId = string;
|
|
274
289
|
export interface ScriptStackFrame {
|
|
@@ -278,7 +293,7 @@ export interface ScriptStackFrame {
|
|
|
278
293
|
url: string;
|
|
279
294
|
}
|
|
280
295
|
export interface ScriptStackTrace {
|
|
281
|
-
callFrames: ScriptStackFrame
|
|
296
|
+
callFrames: Array<ScriptStackFrame>;
|
|
282
297
|
}
|
|
283
298
|
export interface ScriptSource {
|
|
284
299
|
realm: ScriptRealm;
|
|
@@ -299,9 +314,9 @@ export interface ScriptAddPreloadScript {
|
|
|
299
314
|
}
|
|
300
315
|
export interface ScriptAddPreloadScriptParameters {
|
|
301
316
|
functionDeclaration: string;
|
|
302
|
-
arguments?: ScriptChannelValue
|
|
303
|
-
contexts?: BrowsingContextBrowsingContext
|
|
304
|
-
userContexts?: BrowserUserContext
|
|
317
|
+
arguments?: Array<ScriptChannelValue>;
|
|
318
|
+
contexts?: Array<BrowsingContextBrowsingContext>;
|
|
319
|
+
userContexts?: Array<BrowserUserContext>;
|
|
305
320
|
sandbox?: string;
|
|
306
321
|
}
|
|
307
322
|
export interface ScriptAddPreloadScriptResult {
|
|
@@ -312,7 +327,7 @@ export interface ScriptDisown {
|
|
|
312
327
|
params: ScriptDisownParameters;
|
|
313
328
|
}
|
|
314
329
|
export interface ScriptDisownParameters {
|
|
315
|
-
handles: ScriptHandle
|
|
330
|
+
handles: Array<ScriptHandle>;
|
|
316
331
|
target: ScriptTarget;
|
|
317
332
|
}
|
|
318
333
|
export type ScriptDisownResult = EmptyResult;
|
|
@@ -324,7 +339,7 @@ export interface ScriptCallFunctionParameters {
|
|
|
324
339
|
functionDeclaration: string;
|
|
325
340
|
awaitPromise: boolean;
|
|
326
341
|
target: ScriptTarget;
|
|
327
|
-
arguments?: ScriptLocalValue
|
|
342
|
+
arguments?: Array<ScriptLocalValue>;
|
|
328
343
|
resultOwnership?: ScriptResultOwnership;
|
|
329
344
|
serializationOptions?: ScriptSerializationOptions;
|
|
330
345
|
this?: ScriptLocalValue;
|
|
@@ -352,7 +367,7 @@ export interface ScriptGetRealmsParameters {
|
|
|
352
367
|
type?: ScriptRealmType;
|
|
353
368
|
}
|
|
354
369
|
export interface ScriptGetRealmsResult {
|
|
355
|
-
realms: ScriptRealmInfo
|
|
370
|
+
realms: Array<ScriptRealmInfo>;
|
|
356
371
|
}
|
|
357
372
|
export interface ScriptRemovePreloadScript {
|
|
358
373
|
method: "script.removePreloadScript";
|
|
@@ -382,29 +397,110 @@ export interface ScriptRealmDestroyed {
|
|
|
382
397
|
export interface ScriptRealmDestroyedParameters {
|
|
383
398
|
realm: ScriptRealm;
|
|
384
399
|
}
|
|
385
|
-
|
|
386
|
-
export
|
|
387
|
-
export
|
|
388
|
-
|
|
389
|
-
|
|
400
|
+
export type ScriptNodePropertiesMode = "open" | "closed";
|
|
401
|
+
export type ScriptSerializationOptionsIncludeShadowTree = "none" | "open" | "all";
|
|
402
|
+
export interface ScriptNodePropertiesAttributes {
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* This is an unsupported API. No compatibility guarantees are provided.
|
|
406
|
+
* It tracks the W3C WebDriver BiDi specification directly. As the specification
|
|
407
|
+
* evolves, this API will change or be removed without prior notice.
|
|
408
|
+
*/
|
|
409
|
+
export declare class Script extends Domain {
|
|
410
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-script-message */
|
|
411
|
+
static readonly MESSAGE: EventDescriptor<ScriptMessageParameters>;
|
|
412
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-script-realmCreated */
|
|
413
|
+
static readonly REALM_CREATED: EventDescriptor<ScriptRealmInfo>;
|
|
414
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-script-realmDestroyed */
|
|
415
|
+
static readonly REALM_DESTROYED: EventDescriptor<ScriptRealmDestroyedParameters>;
|
|
416
|
+
static readonly SpecialNumber: Readonly<{
|
|
417
|
+
readonly NA_N: "NaN";
|
|
418
|
+
readonly _0: "-0";
|
|
419
|
+
readonly INFINITY: "Infinity";
|
|
420
|
+
readonly _INFINITY: "-Infinity";
|
|
421
|
+
}>;
|
|
422
|
+
static readonly RealmType: Readonly<{
|
|
423
|
+
readonly WINDOW: "window";
|
|
424
|
+
readonly DEDICATED_WORKER: "dedicated-worker";
|
|
425
|
+
readonly SHARED_WORKER: "shared-worker";
|
|
426
|
+
readonly SERVICE_WORKER: "service-worker";
|
|
427
|
+
readonly WORKER: "worker";
|
|
428
|
+
readonly PAINT_WORKLET: "paint-worklet";
|
|
429
|
+
readonly AUDIO_WORKLET: "audio-worklet";
|
|
430
|
+
readonly WORKLET: "worklet";
|
|
431
|
+
}>;
|
|
432
|
+
static readonly ResultOwnership: Readonly<{
|
|
433
|
+
readonly ROOT: "root";
|
|
434
|
+
readonly NONE: "none";
|
|
435
|
+
}>;
|
|
436
|
+
static readonly NodePropertiesMode: Readonly<{
|
|
437
|
+
readonly OPEN: "open";
|
|
438
|
+
readonly CLOSED: "closed";
|
|
439
|
+
}>;
|
|
440
|
+
static readonly SerializationOptionsIncludeShadowTree: Readonly<{
|
|
441
|
+
readonly NONE: "none";
|
|
442
|
+
readonly OPEN: "open";
|
|
443
|
+
readonly ALL: "all";
|
|
444
|
+
}>;
|
|
390
445
|
static create(driver: unknown): Promise<Script>;
|
|
446
|
+
/**
|
|
447
|
+
* @param {ScriptAddPreloadScriptParameters} params
|
|
448
|
+
* @param {string} params.functionDeclaration
|
|
449
|
+
* @param {Array<ScriptChannelValue>} [params.arguments]
|
|
450
|
+
* @param {Array<BrowsingContextBrowsingContext>} [params.contexts]
|
|
451
|
+
* @param {Array<BrowserUserContext>} [params.userContexts]
|
|
452
|
+
* @param {string} [params.sandbox]
|
|
453
|
+
* @returns {Promise<ScriptAddPreloadScriptResult>}
|
|
454
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-script-addPreloadScript
|
|
455
|
+
*/
|
|
391
456
|
addPreloadScript(params: ScriptAddPreloadScriptParameters): Promise<ScriptAddPreloadScriptResult>;
|
|
457
|
+
/**
|
|
458
|
+
* @param {ScriptCallFunctionParameters} params
|
|
459
|
+
* @param {string} params.functionDeclaration
|
|
460
|
+
* @param {boolean} params.awaitPromise
|
|
461
|
+
* @param {ScriptTarget} params.target
|
|
462
|
+
* @param {Array<ScriptLocalValue>} [params.arguments]
|
|
463
|
+
* @param {ScriptResultOwnership} [params.resultOwnership]
|
|
464
|
+
* @param {ScriptSerializationOptions} [params.serializationOptions]
|
|
465
|
+
* @param {ScriptLocalValue} [params.this]
|
|
466
|
+
* @param {boolean} [params.userActivation]
|
|
467
|
+
* @returns {Promise<ScriptCallFunctionResult>}
|
|
468
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-script-callFunction
|
|
469
|
+
*/
|
|
392
470
|
callFunction(params: ScriptCallFunctionParameters): Promise<ScriptCallFunctionResult>;
|
|
471
|
+
/**
|
|
472
|
+
* @param {ScriptDisownParameters} params
|
|
473
|
+
* @param {Array<ScriptHandle>} params.handles
|
|
474
|
+
* @param {ScriptTarget} params.target
|
|
475
|
+
* @returns {Promise<void>}
|
|
476
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-script-disown
|
|
477
|
+
*/
|
|
393
478
|
disown(params: ScriptDisownParameters): Promise<void>;
|
|
479
|
+
/**
|
|
480
|
+
* @param {ScriptEvaluateParameters} params
|
|
481
|
+
* @param {string} params.expression
|
|
482
|
+
* @param {ScriptTarget} params.target
|
|
483
|
+
* @param {boolean} params.awaitPromise
|
|
484
|
+
* @param {ScriptResultOwnership} [params.resultOwnership]
|
|
485
|
+
* @param {ScriptSerializationOptions} [params.serializationOptions]
|
|
486
|
+
* @param {boolean} [params.userActivation]
|
|
487
|
+
* @returns {Promise<ScriptEvaluateResult>}
|
|
488
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-script-evaluate
|
|
489
|
+
*/
|
|
394
490
|
evaluate(params: ScriptEvaluateParameters): Promise<ScriptEvaluateResult>;
|
|
491
|
+
/**
|
|
492
|
+
* @param {ScriptGetRealmsParameters} params
|
|
493
|
+
* @param {BrowsingContextBrowsingContext} [params.context]
|
|
494
|
+
* @param {ScriptRealmType} [params.type]
|
|
495
|
+
* @returns {Promise<ScriptGetRealmsResult>}
|
|
496
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-script-getRealms
|
|
497
|
+
*/
|
|
395
498
|
getRealms(params: ScriptGetRealmsParameters): Promise<ScriptGetRealmsResult>;
|
|
499
|
+
/**
|
|
500
|
+
* @param {ScriptRemovePreloadScriptParameters} params
|
|
501
|
+
* @param {ScriptPreloadScript} params.script
|
|
502
|
+
* @returns {Promise<void>}
|
|
503
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-script-removePreloadScript
|
|
504
|
+
*/
|
|
396
505
|
removePreloadScript(params: ScriptRemovePreloadScriptParameters): Promise<void>;
|
|
397
|
-
onMessage(callback: (params: ScriptMessageParameters) => void): Promise<void>;
|
|
398
|
-
onRealmCreated(callback: (params: ScriptRealmInfo) => void): Promise<void>;
|
|
399
|
-
onRealmDestroyed(callback: (params: ScriptRealmDestroyedParameters) => void): Promise<void>;
|
|
400
|
-
getAllRealms(): Promise<ScriptGetRealmsResult>;
|
|
401
|
-
getRealmsByType(type: ScriptRealmType): Promise<ScriptGetRealmsResult>;
|
|
402
|
-
getRealmsInBrowsingContext(context: BrowsingContextBrowsingContext): Promise<ScriptGetRealmsResult>;
|
|
403
|
-
getRealmsInBrowsingContextByType(context: BrowsingContextBrowsingContext, type: ScriptRealmType): Promise<ScriptGetRealmsResult>;
|
|
404
|
-
callFunctionInRealm(realmId: ScriptRealm, functionDeclaration: string, awaitPromise: boolean, args?: ScriptLocalValue[], resultOwnership?: ScriptResultOwnership, serializationOptions?: ScriptSerializationOptions, userActivation?: boolean): Promise<ScriptEvaluateResult>;
|
|
405
|
-
callFunctionInBrowsingContext(browsingContextId: BrowsingContextBrowsingContext, functionDeclaration: string, awaitPromise: boolean, args?: ScriptLocalValue[], sandbox?: string, resultOwnership?: ScriptResultOwnership, serializationOptions?: ScriptSerializationOptions, userActivation?: boolean): Promise<ScriptEvaluateResult>;
|
|
406
|
-
evaluateFunctionInRealm(realmId: ScriptRealm, expression: string, awaitPromise: boolean, resultOwnership?: ScriptResultOwnership, serializationOptions?: ScriptSerializationOptions, userActivation?: boolean): Promise<ScriptEvaluateResult>;
|
|
407
|
-
evaluateFunctionInBrowsingContext(browsingContextId: BrowsingContextBrowsingContext, expression: string, awaitPromise: boolean, sandbox?: string, resultOwnership?: ScriptResultOwnership, serializationOptions?: ScriptSerializationOptions, userActivation?: boolean): Promise<ScriptEvaluateResult>;
|
|
408
|
-
disownRealmScript(realmId: ScriptRealm, handles: ScriptHandle[]): Promise<void>;
|
|
409
|
-
disownBrowsingContextScript(browsingContextId: BrowsingContextBrowsingContext, handles: ScriptHandle[], sandbox?: string): Promise<void>;
|
|
410
506
|
}
|