selenium-webdriver 4.49.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 +16 -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 +269 -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 +347 -77
- 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-x86_64/selenium-manager +0 -0
- package/bin/macos/selenium-manager +0 -0
- package/bin/selenium-manager-THIRD-PARTY-NOTICES.txt +74 -43
- package/bin/selenium-manager.cdx.json +421 -421
- package/bin/windows/selenium-manager.exe +0 -0
- package/eslint.config.js +2 -1
- package/firefox.js +7 -104
- package/index.js +8 -0
- package/lib/atoms/find-elements.js +14 -2
- package/package.json +9 -9
- package/remote/index.js +12 -3
- package/remote/util.js +5 -5
- package/testing/index.js +84 -1
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import type { BrowserClientWindow, BrowserUserContext } from './browser.js';
|
|
2
|
+
import './browser.js';
|
|
2
3
|
import type { EmptyResult, JsInt, JsUint } from './common.js';
|
|
4
|
+
import './common.js';
|
|
3
5
|
import type { ScriptNodeRemoteValue, ScriptSerializationOptions, ScriptSharedReference } from './script.js';
|
|
6
|
+
import './script.js';
|
|
4
7
|
import type { SessionUserPromptHandlerType } from './session.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export type BrowsingContextEvent = BrowsingContextContextCreated | BrowsingContextContextDestroyed | BrowsingContextDomContentLoaded | BrowsingContextDownloadEnd | BrowsingContextDownloadWillBegin | BrowsingContextFragmentNavigated | BrowsingContextHistoryUpdated | BrowsingContextLoad | BrowsingContextNavigationAborted | BrowsingContextNavigationCommitted | BrowsingContextNavigationFailed | BrowsingContextNavigationStarted | BrowsingContextUserPromptClosed | BrowsingContextUserPromptOpened;
|
|
8
|
+
import './session.js';
|
|
9
|
+
import { Domain, type EventDescriptor } from '../domain.js';
|
|
8
10
|
export type BrowsingContextBrowsingContext = string;
|
|
9
|
-
export type BrowsingContextInfoList = BrowsingContextInfo
|
|
11
|
+
export type BrowsingContextInfoList = Array<BrowsingContextInfo>;
|
|
12
|
+
export interface BrowsingContextBaseInfo {
|
|
13
|
+
children: BrowsingContextInfoList | null;
|
|
14
|
+
clientWindow: BrowserClientWindow;
|
|
15
|
+
context: BrowsingContextBrowsingContext;
|
|
16
|
+
originalOpener: BrowsingContextBrowsingContext | null;
|
|
17
|
+
url: string;
|
|
18
|
+
userContext: BrowserUserContext;
|
|
19
|
+
parent?: BrowsingContextBrowsingContext | null;
|
|
20
|
+
}
|
|
10
21
|
export interface BrowsingContextInfo {
|
|
11
22
|
children: BrowsingContextInfoList | null;
|
|
12
23
|
clientWindow: BrowserClientWindow;
|
|
@@ -19,10 +30,7 @@ export interface BrowsingContextInfo {
|
|
|
19
30
|
export type BrowsingContextLocator = BrowsingContextAccessibilityLocator | BrowsingContextCssLocator | BrowsingContextContextLocator | BrowsingContextInnerTextLocator | BrowsingContextXPathLocator;
|
|
20
31
|
export interface BrowsingContextAccessibilityLocator {
|
|
21
32
|
type: "accessibility";
|
|
22
|
-
value:
|
|
23
|
-
name?: string;
|
|
24
|
-
role?: string;
|
|
25
|
-
};
|
|
33
|
+
value: BrowsingContextAccessibilityLocatorValue;
|
|
26
34
|
}
|
|
27
35
|
export interface BrowsingContextCssLocator {
|
|
28
36
|
type: "css";
|
|
@@ -30,15 +38,13 @@ export interface BrowsingContextCssLocator {
|
|
|
30
38
|
}
|
|
31
39
|
export interface BrowsingContextContextLocator {
|
|
32
40
|
type: "context";
|
|
33
|
-
value:
|
|
34
|
-
context: BrowsingContextBrowsingContext;
|
|
35
|
-
};
|
|
41
|
+
value: BrowsingContextContextLocatorValue;
|
|
36
42
|
}
|
|
37
43
|
export interface BrowsingContextInnerTextLocator {
|
|
38
44
|
type: "innerText";
|
|
39
45
|
value: string;
|
|
40
46
|
ignoreCase?: boolean;
|
|
41
|
-
matchType?:
|
|
47
|
+
matchType?: BrowsingContextInnerTextLocatorMatchType;
|
|
42
48
|
maxDepth?: JsUint;
|
|
43
49
|
}
|
|
44
50
|
export interface BrowsingContextXPathLocator {
|
|
@@ -54,7 +60,13 @@ export interface BrowsingContextBaseNavigationInfo {
|
|
|
54
60
|
url: string;
|
|
55
61
|
userContext?: BrowserUserContext;
|
|
56
62
|
}
|
|
57
|
-
export
|
|
63
|
+
export interface BrowsingContextNavigationInfo {
|
|
64
|
+
context: BrowsingContextBrowsingContext;
|
|
65
|
+
navigation: BrowsingContextNavigation | null;
|
|
66
|
+
timestamp: JsUint;
|
|
67
|
+
url: string;
|
|
68
|
+
userContext?: BrowserUserContext;
|
|
69
|
+
}
|
|
58
70
|
export type BrowsingContextReadinessState = "none" | "interactive" | "complete";
|
|
59
71
|
export type BrowsingContextUserPromptType = "alert" | "beforeunload" | "confirm" | "prompt";
|
|
60
72
|
export interface BrowsingContextActivate {
|
|
@@ -71,10 +83,7 @@ export interface BrowsingContextCaptureScreenshot {
|
|
|
71
83
|
}
|
|
72
84
|
export interface BrowsingContextCaptureScreenshotParameters {
|
|
73
85
|
context: BrowsingContextBrowsingContext;
|
|
74
|
-
|
|
75
|
-
* @default 'viewport'
|
|
76
|
-
*/
|
|
77
|
-
origin?: "viewport" | "document";
|
|
86
|
+
origin?: BrowsingContextCaptureScreenshotParametersOrigin;
|
|
78
87
|
format?: BrowsingContextImageFormat;
|
|
79
88
|
clip?: BrowsingContextClipRectangle;
|
|
80
89
|
imageSize?: BrowsingContextImageSize;
|
|
@@ -156,10 +165,10 @@ export interface BrowsingContextLocateNodesParameters {
|
|
|
156
165
|
locator: BrowsingContextLocator;
|
|
157
166
|
maxNodeCount?: JsUint;
|
|
158
167
|
serializationOptions?: ScriptSerializationOptions;
|
|
159
|
-
startNodes?: ScriptSharedReference
|
|
168
|
+
startNodes?: Array<ScriptSharedReference>;
|
|
160
169
|
}
|
|
161
170
|
export interface BrowsingContextLocateNodesResult {
|
|
162
|
-
nodes: ScriptNodeRemoteValue
|
|
171
|
+
nodes: Array<ScriptNodeRemoteValue>;
|
|
163
172
|
}
|
|
164
173
|
export interface BrowsingContextNavigate {
|
|
165
174
|
method: "browsingContext.navigate";
|
|
@@ -182,47 +191,20 @@ export interface BrowsingContextPrintParameters {
|
|
|
182
191
|
context: BrowsingContextBrowsingContext;
|
|
183
192
|
background?: boolean;
|
|
184
193
|
margin?: BrowsingContextPrintMarginParameters;
|
|
185
|
-
|
|
186
|
-
* @default 'portrait'
|
|
187
|
-
*/
|
|
188
|
-
orientation?: "portrait" | "landscape";
|
|
194
|
+
orientation?: BrowsingContextPrintParametersOrientation;
|
|
189
195
|
page?: BrowsingContextPrintPageParameters;
|
|
190
|
-
pageRanges?:
|
|
191
|
-
/**
|
|
192
|
-
* @default 1
|
|
193
|
-
*/
|
|
196
|
+
pageRanges?: Array<JsUint | string>;
|
|
194
197
|
scale?: number;
|
|
195
|
-
/**
|
|
196
|
-
* @default true
|
|
197
|
-
*/
|
|
198
198
|
shrinkToFit?: boolean;
|
|
199
199
|
}
|
|
200
200
|
export interface BrowsingContextPrintMarginParameters {
|
|
201
|
-
/**
|
|
202
|
-
* @default 1
|
|
203
|
-
*/
|
|
204
201
|
bottom?: number;
|
|
205
|
-
/**
|
|
206
|
-
* @default 1
|
|
207
|
-
*/
|
|
208
202
|
left?: number;
|
|
209
|
-
/**
|
|
210
|
-
* @default 1
|
|
211
|
-
*/
|
|
212
203
|
right?: number;
|
|
213
|
-
/**
|
|
214
|
-
* @default 1
|
|
215
|
-
*/
|
|
216
204
|
top?: number;
|
|
217
205
|
}
|
|
218
206
|
export interface BrowsingContextPrintPageParameters {
|
|
219
|
-
/**
|
|
220
|
-
* @default 27.94
|
|
221
|
-
*/
|
|
222
207
|
height?: number;
|
|
223
|
-
/**
|
|
224
|
-
* @default 21.59
|
|
225
|
-
*/
|
|
226
208
|
width?: number;
|
|
227
209
|
}
|
|
228
210
|
export interface BrowsingContextPrintResult {
|
|
@@ -244,8 +226,8 @@ export interface BrowsingContextSetBypassCsp {
|
|
|
244
226
|
}
|
|
245
227
|
export interface BrowsingContextSetBypassCspParameters {
|
|
246
228
|
bypass: true | null;
|
|
247
|
-
contexts?: BrowsingContextBrowsingContext
|
|
248
|
-
userContexts?: BrowserUserContext
|
|
229
|
+
contexts?: Array<BrowsingContextBrowsingContext>;
|
|
230
|
+
userContexts?: Array<BrowserUserContext>;
|
|
249
231
|
}
|
|
250
232
|
export type BrowsingContextSetBypassCspResult = EmptyResult;
|
|
251
233
|
export interface BrowsingContextSetViewport {
|
|
@@ -256,7 +238,7 @@ export interface BrowsingContextSetViewportParameters {
|
|
|
256
238
|
context?: BrowsingContextBrowsingContext;
|
|
257
239
|
viewport?: BrowsingContextViewport | null;
|
|
258
240
|
devicePixelRatio?: number | null;
|
|
259
|
-
userContexts?: BrowserUserContext
|
|
241
|
+
userContexts?: Array<BrowserUserContext>;
|
|
260
242
|
}
|
|
261
243
|
export interface BrowsingContextViewport {
|
|
262
244
|
width: JsUint;
|
|
@@ -269,6 +251,7 @@ export interface BrowsingContextStartScreencast {
|
|
|
269
251
|
}
|
|
270
252
|
export interface BrowsingContextStartScreencastParameters {
|
|
271
253
|
context: BrowsingContextBrowsingContext;
|
|
254
|
+
destinationFolder?: string;
|
|
272
255
|
mimeType?: string;
|
|
273
256
|
video?: BrowsingContextMediaTrackConstraints;
|
|
274
257
|
audio?: boolean;
|
|
@@ -305,7 +288,7 @@ export interface BrowsingContextTraverseHistoryParameters {
|
|
|
305
288
|
export type BrowsingContextTraverseHistoryResult = EmptyResult;
|
|
306
289
|
export interface BrowsingContextContextCreated {
|
|
307
290
|
method: "browsingContext.contextCreated";
|
|
308
|
-
params:
|
|
291
|
+
params: BrowsingContextContextCreatedParameters;
|
|
309
292
|
}
|
|
310
293
|
export interface BrowsingContextContextDestroyed {
|
|
311
294
|
method: "browsingContext.contextDestroyed";
|
|
@@ -341,24 +324,20 @@ export interface BrowsingContextDownloadWillBegin {
|
|
|
341
324
|
method: "browsingContext.downloadWillBegin";
|
|
342
325
|
params: BrowsingContextDownloadWillBeginParams;
|
|
343
326
|
}
|
|
344
|
-
export
|
|
327
|
+
export interface BrowsingContextDownloadWillBeginParams {
|
|
345
328
|
download: BrowsingContextDownload;
|
|
346
329
|
suggestedFilename: string;
|
|
347
|
-
|
|
330
|
+
context: BrowsingContextBrowsingContext;
|
|
331
|
+
navigation: BrowsingContextNavigation | null;
|
|
332
|
+
timestamp: JsUint;
|
|
333
|
+
url: string;
|
|
334
|
+
userContext?: BrowserUserContext;
|
|
335
|
+
}
|
|
348
336
|
export interface BrowsingContextDownloadEnd {
|
|
349
337
|
method: "browsingContext.downloadEnd";
|
|
350
338
|
params: BrowsingContextDownloadEndParams;
|
|
351
339
|
}
|
|
352
|
-
export type BrowsingContextDownloadEndParams =
|
|
353
|
-
export type BrowsingContextDownloadCanceledParams = BrowsingContextBaseNavigationInfo & {
|
|
354
|
-
status: "canceled";
|
|
355
|
-
download: BrowsingContextDownload;
|
|
356
|
-
};
|
|
357
|
-
export type BrowsingContextDownloadCompleteParams = BrowsingContextBaseNavigationInfo & {
|
|
358
|
-
status: "complete";
|
|
359
|
-
download: BrowsingContextDownload;
|
|
360
|
-
filepath: string | null;
|
|
361
|
-
};
|
|
340
|
+
export type BrowsingContextDownloadEndParams = BrowsingContextDownloadEndParams_CanceledParams | BrowsingContextDownloadEndParams_CompleteParams;
|
|
362
341
|
export interface BrowsingContextNavigationAborted {
|
|
363
342
|
method: "browsingContext.navigationAborted";
|
|
364
343
|
params: BrowsingContextNavigationInfo;
|
|
@@ -394,43 +373,246 @@ export interface BrowsingContextUserPromptOpenedParameters {
|
|
|
394
373
|
userContext?: BrowserUserContext;
|
|
395
374
|
defaultValue?: string;
|
|
396
375
|
}
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
376
|
+
export interface BrowsingContextContextCreatedParameters {
|
|
377
|
+
children: BrowsingContextInfoList | null;
|
|
378
|
+
clientWindow: BrowserClientWindow;
|
|
379
|
+
context: BrowsingContextBrowsingContext;
|
|
380
|
+
originalOpener: BrowsingContextBrowsingContext | null;
|
|
381
|
+
url: string;
|
|
382
|
+
userContext: BrowserUserContext;
|
|
383
|
+
parent?: BrowsingContextBrowsingContext | null;
|
|
384
|
+
hasPlannedNavigation?: boolean;
|
|
385
|
+
}
|
|
386
|
+
export type BrowsingContextInnerTextLocatorMatchType = "full" | "partial";
|
|
387
|
+
export type BrowsingContextCaptureScreenshotParametersOrigin = "viewport" | "document";
|
|
388
|
+
export type BrowsingContextPrintParametersOrientation = "portrait" | "landscape";
|
|
389
|
+
export interface BrowsingContextDownloadEndParams_CanceledParams {
|
|
390
|
+
status: "canceled";
|
|
391
|
+
download: BrowsingContextDownload;
|
|
392
|
+
context: BrowsingContextBrowsingContext;
|
|
393
|
+
navigation: BrowsingContextNavigation | null;
|
|
394
|
+
timestamp: JsUint;
|
|
395
|
+
url: string;
|
|
396
|
+
userContext?: BrowserUserContext;
|
|
397
|
+
}
|
|
398
|
+
export interface BrowsingContextDownloadEndParams_CompleteParams {
|
|
399
|
+
status: "complete";
|
|
400
|
+
download: BrowsingContextDownload;
|
|
401
|
+
filepath: string | null;
|
|
402
|
+
context: BrowsingContextBrowsingContext;
|
|
403
|
+
navigation: BrowsingContextNavigation | null;
|
|
404
|
+
timestamp: JsUint;
|
|
405
|
+
url: string;
|
|
406
|
+
userContext?: BrowserUserContext;
|
|
407
|
+
}
|
|
408
|
+
export interface BrowsingContextAccessibilityLocatorValue {
|
|
409
|
+
name?: string;
|
|
410
|
+
role?: string;
|
|
411
|
+
}
|
|
412
|
+
export interface BrowsingContextContextLocatorValue {
|
|
413
|
+
context: BrowsingContextBrowsingContext;
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* This is an unsupported API. No compatibility guarantees are provided.
|
|
417
|
+
* It tracks the W3C WebDriver BiDi specification directly. As the specification
|
|
418
|
+
* evolves, this API will change or be removed without prior notice.
|
|
419
|
+
*/
|
|
420
|
+
export declare class BrowsingContext extends Domain {
|
|
421
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-contextCreated */
|
|
422
|
+
static readonly CONTEXT_CREATED: EventDescriptor<BrowsingContextContextCreatedParameters>;
|
|
423
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-contextDestroyed */
|
|
424
|
+
static readonly CONTEXT_DESTROYED: EventDescriptor<BrowsingContextInfo>;
|
|
425
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-domContentLoaded */
|
|
426
|
+
static readonly DOM_CONTENT_LOADED: EventDescriptor<BrowsingContextNavigationInfo>;
|
|
427
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-downloadEnd */
|
|
428
|
+
static readonly DOWNLOAD_END: EventDescriptor<BrowsingContextDownloadEndParams>;
|
|
429
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-downloadWillBegin */
|
|
430
|
+
static readonly DOWNLOAD_WILL_BEGIN: EventDescriptor<BrowsingContextDownloadWillBeginParams>;
|
|
431
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-fragmentNavigated */
|
|
432
|
+
static readonly FRAGMENT_NAVIGATED: EventDescriptor<BrowsingContextNavigationInfo>;
|
|
433
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-historyUpdated */
|
|
434
|
+
static readonly HISTORY_UPDATED: EventDescriptor<BrowsingContextHistoryUpdatedParameters>;
|
|
435
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-load */
|
|
436
|
+
static readonly LOAD: EventDescriptor<BrowsingContextNavigationInfo>;
|
|
437
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-navigationAborted */
|
|
438
|
+
static readonly NAVIGATION_ABORTED: EventDescriptor<BrowsingContextNavigationInfo>;
|
|
439
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-navigationCommitted */
|
|
440
|
+
static readonly NAVIGATION_COMMITTED: EventDescriptor<BrowsingContextNavigationInfo>;
|
|
441
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-navigationFailed */
|
|
442
|
+
static readonly NAVIGATION_FAILED: EventDescriptor<BrowsingContextNavigationInfo>;
|
|
443
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-navigationStarted */
|
|
444
|
+
static readonly NAVIGATION_STARTED: EventDescriptor<BrowsingContextNavigationInfo>;
|
|
445
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-userPromptClosed */
|
|
446
|
+
static readonly USER_PROMPT_CLOSED: EventDescriptor<BrowsingContextUserPromptClosedParameters>;
|
|
447
|
+
/** @see https://w3c.github.io/webdriver-bidi/#event-browsingContext-userPromptOpened */
|
|
448
|
+
static readonly USER_PROMPT_OPENED: EventDescriptor<BrowsingContextUserPromptOpenedParameters>;
|
|
449
|
+
static readonly ReadinessState: Readonly<{
|
|
450
|
+
readonly NONE: "none";
|
|
451
|
+
readonly INTERACTIVE: "interactive";
|
|
452
|
+
readonly COMPLETE: "complete";
|
|
453
|
+
}>;
|
|
454
|
+
static readonly UserPromptType: Readonly<{
|
|
455
|
+
readonly ALERT: "alert";
|
|
456
|
+
readonly BEFOREUNLOAD: "beforeunload";
|
|
457
|
+
readonly CONFIRM: "confirm";
|
|
458
|
+
readonly PROMPT: "prompt";
|
|
459
|
+
}>;
|
|
460
|
+
static readonly CreateType: Readonly<{
|
|
461
|
+
readonly TAB: "tab";
|
|
462
|
+
readonly WINDOW: "window";
|
|
463
|
+
}>;
|
|
464
|
+
static readonly InnerTextLocatorMatchType: Readonly<{
|
|
465
|
+
readonly FULL: "full";
|
|
466
|
+
readonly PARTIAL: "partial";
|
|
467
|
+
}>;
|
|
468
|
+
static readonly CaptureScreenshotParametersOrigin: Readonly<{
|
|
469
|
+
readonly VIEWPORT: "viewport";
|
|
470
|
+
readonly DOCUMENT: "document";
|
|
471
|
+
}>;
|
|
472
|
+
static readonly PrintParametersOrientation: Readonly<{
|
|
473
|
+
readonly PORTRAIT: "portrait";
|
|
474
|
+
readonly LANDSCAPE: "landscape";
|
|
475
|
+
}>;
|
|
402
476
|
static create(driver: unknown): Promise<BrowsingContext>;
|
|
477
|
+
/**
|
|
478
|
+
* @param {BrowsingContextActivateParameters} params
|
|
479
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
480
|
+
* @returns {Promise<void>}
|
|
481
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-activate
|
|
482
|
+
*/
|
|
403
483
|
activate(params: BrowsingContextActivateParameters): Promise<void>;
|
|
484
|
+
/**
|
|
485
|
+
* @param {BrowsingContextCaptureScreenshotParameters} params
|
|
486
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
487
|
+
* @param {BrowsingContextCaptureScreenshotParametersOrigin} [params.origin]
|
|
488
|
+
* @param {BrowsingContextImageFormat} [params.format]
|
|
489
|
+
* @param {BrowsingContextClipRectangle} [params.clip]
|
|
490
|
+
* @param {BrowsingContextImageSize} [params.imageSize]
|
|
491
|
+
* @returns {Promise<BrowsingContextCaptureScreenshotResult>}
|
|
492
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-captureScreenshot
|
|
493
|
+
*/
|
|
404
494
|
captureScreenshot(params: BrowsingContextCaptureScreenshotParameters): Promise<BrowsingContextCaptureScreenshotResult>;
|
|
495
|
+
/**
|
|
496
|
+
* @param {BrowsingContextCloseParameters} params
|
|
497
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
498
|
+
* @param {boolean} [params.promptUnload]
|
|
499
|
+
* @returns {Promise<void>}
|
|
500
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-close
|
|
501
|
+
*/
|
|
405
502
|
close(params: BrowsingContextCloseParameters): Promise<void>;
|
|
503
|
+
/**
|
|
504
|
+
* @param {BrowsingContextCreateParameters} params
|
|
505
|
+
* @param {BrowsingContextCreateType} params.type
|
|
506
|
+
* @param {BrowsingContextBrowsingContext} [params.referenceContext]
|
|
507
|
+
* @param {boolean} [params.background]
|
|
508
|
+
* @param {BrowserUserContext} [params.userContext]
|
|
509
|
+
* @returns {Promise<BrowsingContextCreateResult>}
|
|
510
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-create
|
|
511
|
+
*/
|
|
406
512
|
create(params: BrowsingContextCreateParameters): Promise<BrowsingContextCreateResult>;
|
|
513
|
+
/**
|
|
514
|
+
* @param {BrowsingContextGetTreeParameters} params
|
|
515
|
+
* @param {JsUint} [params.maxDepth]
|
|
516
|
+
* @param {BrowsingContextBrowsingContext} [params.root]
|
|
517
|
+
* @returns {Promise<BrowsingContextGetTreeResult>}
|
|
518
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-getTree
|
|
519
|
+
*/
|
|
407
520
|
getTree(params: BrowsingContextGetTreeParameters): Promise<BrowsingContextGetTreeResult>;
|
|
521
|
+
/**
|
|
522
|
+
* @param {BrowsingContextHandleUserPromptParameters} params
|
|
523
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
524
|
+
* @param {boolean} [params.accept]
|
|
525
|
+
* @param {string} [params.userText]
|
|
526
|
+
* @returns {Promise<void>}
|
|
527
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-handleUserPrompt
|
|
528
|
+
*/
|
|
408
529
|
handleUserPrompt(params: BrowsingContextHandleUserPromptParameters): Promise<void>;
|
|
530
|
+
/**
|
|
531
|
+
* @param {BrowsingContextLocateNodesParameters} params
|
|
532
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
533
|
+
* @param {BrowsingContextLocator} params.locator
|
|
534
|
+
* @param {JsUint} [params.maxNodeCount]
|
|
535
|
+
* @param {ScriptSerializationOptions} [params.serializationOptions]
|
|
536
|
+
* @param {Array<ScriptSharedReference>} [params.startNodes]
|
|
537
|
+
* @returns {Promise<BrowsingContextLocateNodesResult>}
|
|
538
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-locateNodes
|
|
539
|
+
*/
|
|
409
540
|
locateNodes(params: BrowsingContextLocateNodesParameters): Promise<BrowsingContextLocateNodesResult>;
|
|
541
|
+
/**
|
|
542
|
+
* @param {BrowsingContextNavigateParameters} params
|
|
543
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
544
|
+
* @param {string} params.url
|
|
545
|
+
* @param {BrowsingContextReadinessState} [params.wait]
|
|
546
|
+
* @returns {Promise<BrowsingContextNavigateResult>}
|
|
547
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-navigate
|
|
548
|
+
*/
|
|
410
549
|
navigate(params: BrowsingContextNavigateParameters): Promise<BrowsingContextNavigateResult>;
|
|
550
|
+
/**
|
|
551
|
+
* @param {BrowsingContextPrintParameters} params
|
|
552
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
553
|
+
* @param {boolean} [params.background]
|
|
554
|
+
* @param {BrowsingContextPrintMarginParameters} [params.margin]
|
|
555
|
+
* @param {BrowsingContextPrintParametersOrientation} [params.orientation]
|
|
556
|
+
* @param {BrowsingContextPrintPageParameters} [params.page]
|
|
557
|
+
* @param {Array<JsUint | string>} [params.pageRanges]
|
|
558
|
+
* @param {number} [params.scale]
|
|
559
|
+
* @param {boolean} [params.shrinkToFit]
|
|
560
|
+
* @returns {Promise<BrowsingContextPrintResult>}
|
|
561
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-print
|
|
562
|
+
*/
|
|
411
563
|
print(params: BrowsingContextPrintParameters): Promise<BrowsingContextPrintResult>;
|
|
564
|
+
/**
|
|
565
|
+
* @param {BrowsingContextReloadParameters} params
|
|
566
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
567
|
+
* @param {boolean} [params.ignoreCache]
|
|
568
|
+
* @param {BrowsingContextReadinessState} [params.wait]
|
|
569
|
+
* @returns {Promise<BrowsingContextReloadResult>}
|
|
570
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-reload
|
|
571
|
+
*/
|
|
412
572
|
reload(params: BrowsingContextReloadParameters): Promise<BrowsingContextReloadResult>;
|
|
573
|
+
/**
|
|
574
|
+
* @param {BrowsingContextSetBypassCspParameters} params
|
|
575
|
+
* @param {true | null} params.bypass
|
|
576
|
+
* @param {Array<BrowsingContextBrowsingContext>} [params.contexts]
|
|
577
|
+
* @param {Array<BrowserUserContext>} [params.userContexts]
|
|
578
|
+
* @returns {Promise<void>}
|
|
579
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-setBypassCSP
|
|
580
|
+
*/
|
|
413
581
|
setBypassCSP(params: BrowsingContextSetBypassCspParameters): Promise<void>;
|
|
582
|
+
/**
|
|
583
|
+
* @param {BrowsingContextSetViewportParameters} params
|
|
584
|
+
* @param {BrowsingContextBrowsingContext} [params.context]
|
|
585
|
+
* @param {BrowsingContextViewport | null} [params.viewport]
|
|
586
|
+
* @param {number | null} [params.devicePixelRatio]
|
|
587
|
+
* @param {Array<BrowserUserContext>} [params.userContexts]
|
|
588
|
+
* @returns {Promise<void>}
|
|
589
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-setViewport
|
|
590
|
+
*/
|
|
414
591
|
setViewport(params: BrowsingContextSetViewportParameters): Promise<void>;
|
|
592
|
+
/**
|
|
593
|
+
* @param {BrowsingContextStartScreencastParameters} params
|
|
594
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
595
|
+
* @param {string} [params.destinationFolder]
|
|
596
|
+
* @param {string} [params.mimeType]
|
|
597
|
+
* @param {BrowsingContextMediaTrackConstraints} [params.video]
|
|
598
|
+
* @param {boolean} [params.audio]
|
|
599
|
+
* @returns {Promise<BrowsingContextStartScreencastResult>}
|
|
600
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-startScreencast
|
|
601
|
+
*/
|
|
415
602
|
startScreencast(params: BrowsingContextStartScreencastParameters): Promise<BrowsingContextStartScreencastResult>;
|
|
603
|
+
/**
|
|
604
|
+
* @param {BrowsingContextStopScreencastParameters} params
|
|
605
|
+
* @param {BrowsingContextScreencast} params.screencast
|
|
606
|
+
* @returns {Promise<BrowsingContextStopScreencastResult>}
|
|
607
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-stopScreencast
|
|
608
|
+
*/
|
|
416
609
|
stopScreencast(params: BrowsingContextStopScreencastParameters): Promise<BrowsingContextStopScreencastResult>;
|
|
610
|
+
/**
|
|
611
|
+
* @param {BrowsingContextTraverseHistoryParameters} params
|
|
612
|
+
* @param {BrowsingContextBrowsingContext} params.context
|
|
613
|
+
* @param {JsInt} params.delta
|
|
614
|
+
* @returns {Promise<void>}
|
|
615
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-browsingContext-traverseHistory
|
|
616
|
+
*/
|
|
417
617
|
traverseHistory(params: BrowsingContextTraverseHistoryParameters): Promise<void>;
|
|
418
|
-
onContextCreated(callback: (params: BrowsingContextInfo) => void): Promise<void>;
|
|
419
|
-
onContextDestroyed(callback: (params: BrowsingContextInfo) => void): Promise<void>;
|
|
420
|
-
onDomContentLoaded(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
421
|
-
onDownloadEnd(callback: (params: BrowsingContextDownloadEndParams) => void): Promise<void>;
|
|
422
|
-
onDownloadWillBegin(callback: (params: BrowsingContextDownloadWillBeginParams) => void): Promise<void>;
|
|
423
|
-
onFragmentNavigated(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
424
|
-
onHistoryUpdated(callback: (params: BrowsingContextHistoryUpdatedParameters) => void): Promise<void>;
|
|
425
|
-
onLoad(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
426
|
-
onNavigationAborted(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
427
|
-
onNavigationCommitted(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
428
|
-
onNavigationFailed(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
429
|
-
onNavigationStarted(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
430
|
-
onUserPromptClosed(callback: (params: BrowsingContextUserPromptClosedParameters) => void): Promise<void>;
|
|
431
|
-
onUserPromptOpened(callback: (params: BrowsingContextUserPromptOpenedParameters) => void): Promise<void>;
|
|
432
|
-
back(context: BrowsingContextBrowsingContext): Promise<void>;
|
|
433
|
-
forward(context: BrowsingContextBrowsingContext): Promise<void>;
|
|
434
|
-
getTopLevelContexts(): Promise<BrowsingContextGetTreeResult>;
|
|
435
|
-
printPage(params: BrowsingContextPrintParameters): Promise<BrowsingContextPrintResult>;
|
|
436
618
|
}
|