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
|
@@ -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,17 +83,19 @@ 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;
|
|
89
|
+
imageSize?: BrowsingContextImageSize;
|
|
80
90
|
}
|
|
81
91
|
export interface BrowsingContextImageFormat {
|
|
82
92
|
type: string;
|
|
83
93
|
quality?: number;
|
|
84
94
|
}
|
|
95
|
+
export interface BrowsingContextImageSize {
|
|
96
|
+
maxWidth?: JsUint;
|
|
97
|
+
maxHeight?: JsUint;
|
|
98
|
+
}
|
|
85
99
|
export type BrowsingContextClipRectangle = BrowsingContextBoxClipRectangle | BrowsingContextElementClipRectangle;
|
|
86
100
|
export interface BrowsingContextElementClipRectangle {
|
|
87
101
|
type: "element";
|
|
@@ -151,10 +165,10 @@ export interface BrowsingContextLocateNodesParameters {
|
|
|
151
165
|
locator: BrowsingContextLocator;
|
|
152
166
|
maxNodeCount?: JsUint;
|
|
153
167
|
serializationOptions?: ScriptSerializationOptions;
|
|
154
|
-
startNodes?: ScriptSharedReference
|
|
168
|
+
startNodes?: Array<ScriptSharedReference>;
|
|
155
169
|
}
|
|
156
170
|
export interface BrowsingContextLocateNodesResult {
|
|
157
|
-
nodes: ScriptNodeRemoteValue
|
|
171
|
+
nodes: Array<ScriptNodeRemoteValue>;
|
|
158
172
|
}
|
|
159
173
|
export interface BrowsingContextNavigate {
|
|
160
174
|
method: "browsingContext.navigate";
|
|
@@ -177,47 +191,20 @@ export interface BrowsingContextPrintParameters {
|
|
|
177
191
|
context: BrowsingContextBrowsingContext;
|
|
178
192
|
background?: boolean;
|
|
179
193
|
margin?: BrowsingContextPrintMarginParameters;
|
|
180
|
-
|
|
181
|
-
* @default 'portrait'
|
|
182
|
-
*/
|
|
183
|
-
orientation?: "portrait" | "landscape";
|
|
194
|
+
orientation?: BrowsingContextPrintParametersOrientation;
|
|
184
195
|
page?: BrowsingContextPrintPageParameters;
|
|
185
|
-
pageRanges?:
|
|
186
|
-
/**
|
|
187
|
-
* @default 1
|
|
188
|
-
*/
|
|
196
|
+
pageRanges?: Array<JsUint | string>;
|
|
189
197
|
scale?: number;
|
|
190
|
-
/**
|
|
191
|
-
* @default true
|
|
192
|
-
*/
|
|
193
198
|
shrinkToFit?: boolean;
|
|
194
199
|
}
|
|
195
200
|
export interface BrowsingContextPrintMarginParameters {
|
|
196
|
-
/**
|
|
197
|
-
* @default 1
|
|
198
|
-
*/
|
|
199
201
|
bottom?: number;
|
|
200
|
-
/**
|
|
201
|
-
* @default 1
|
|
202
|
-
*/
|
|
203
202
|
left?: number;
|
|
204
|
-
/**
|
|
205
|
-
* @default 1
|
|
206
|
-
*/
|
|
207
203
|
right?: number;
|
|
208
|
-
/**
|
|
209
|
-
* @default 1
|
|
210
|
-
*/
|
|
211
204
|
top?: number;
|
|
212
205
|
}
|
|
213
206
|
export interface BrowsingContextPrintPageParameters {
|
|
214
|
-
/**
|
|
215
|
-
* @default 27.94
|
|
216
|
-
*/
|
|
217
207
|
height?: number;
|
|
218
|
-
/**
|
|
219
|
-
* @default 21.59
|
|
220
|
-
*/
|
|
221
208
|
width?: number;
|
|
222
209
|
}
|
|
223
210
|
export interface BrowsingContextPrintResult {
|
|
@@ -239,8 +226,8 @@ export interface BrowsingContextSetBypassCsp {
|
|
|
239
226
|
}
|
|
240
227
|
export interface BrowsingContextSetBypassCspParameters {
|
|
241
228
|
bypass: true | null;
|
|
242
|
-
contexts?: BrowsingContextBrowsingContext
|
|
243
|
-
userContexts?: BrowserUserContext
|
|
229
|
+
contexts?: Array<BrowsingContextBrowsingContext>;
|
|
230
|
+
userContexts?: Array<BrowserUserContext>;
|
|
244
231
|
}
|
|
245
232
|
export type BrowsingContextSetBypassCspResult = EmptyResult;
|
|
246
233
|
export interface BrowsingContextSetViewport {
|
|
@@ -251,7 +238,7 @@ export interface BrowsingContextSetViewportParameters {
|
|
|
251
238
|
context?: BrowsingContextBrowsingContext;
|
|
252
239
|
viewport?: BrowsingContextViewport | null;
|
|
253
240
|
devicePixelRatio?: number | null;
|
|
254
|
-
userContexts?: BrowserUserContext
|
|
241
|
+
userContexts?: Array<BrowserUserContext>;
|
|
255
242
|
}
|
|
256
243
|
export interface BrowsingContextViewport {
|
|
257
244
|
width: JsUint;
|
|
@@ -264,6 +251,7 @@ export interface BrowsingContextStartScreencast {
|
|
|
264
251
|
}
|
|
265
252
|
export interface BrowsingContextStartScreencastParameters {
|
|
266
253
|
context: BrowsingContextBrowsingContext;
|
|
254
|
+
destinationFolder?: string;
|
|
267
255
|
mimeType?: string;
|
|
268
256
|
video?: BrowsingContextMediaTrackConstraints;
|
|
269
257
|
audio?: boolean;
|
|
@@ -300,7 +288,7 @@ export interface BrowsingContextTraverseHistoryParameters {
|
|
|
300
288
|
export type BrowsingContextTraverseHistoryResult = EmptyResult;
|
|
301
289
|
export interface BrowsingContextContextCreated {
|
|
302
290
|
method: "browsingContext.contextCreated";
|
|
303
|
-
params:
|
|
291
|
+
params: BrowsingContextContextCreatedParameters;
|
|
304
292
|
}
|
|
305
293
|
export interface BrowsingContextContextDestroyed {
|
|
306
294
|
method: "browsingContext.contextDestroyed";
|
|
@@ -336,24 +324,20 @@ export interface BrowsingContextDownloadWillBegin {
|
|
|
336
324
|
method: "browsingContext.downloadWillBegin";
|
|
337
325
|
params: BrowsingContextDownloadWillBeginParams;
|
|
338
326
|
}
|
|
339
|
-
export
|
|
327
|
+
export interface BrowsingContextDownloadWillBeginParams {
|
|
340
328
|
download: BrowsingContextDownload;
|
|
341
329
|
suggestedFilename: string;
|
|
342
|
-
|
|
330
|
+
context: BrowsingContextBrowsingContext;
|
|
331
|
+
navigation: BrowsingContextNavigation | null;
|
|
332
|
+
timestamp: JsUint;
|
|
333
|
+
url: string;
|
|
334
|
+
userContext?: BrowserUserContext;
|
|
335
|
+
}
|
|
343
336
|
export interface BrowsingContextDownloadEnd {
|
|
344
337
|
method: "browsingContext.downloadEnd";
|
|
345
338
|
params: BrowsingContextDownloadEndParams;
|
|
346
339
|
}
|
|
347
|
-
export type BrowsingContextDownloadEndParams =
|
|
348
|
-
export type BrowsingContextDownloadCanceledParams = BrowsingContextBaseNavigationInfo & {
|
|
349
|
-
status: "canceled";
|
|
350
|
-
download: BrowsingContextDownload;
|
|
351
|
-
};
|
|
352
|
-
export type BrowsingContextDownloadCompleteParams = BrowsingContextBaseNavigationInfo & {
|
|
353
|
-
status: "complete";
|
|
354
|
-
download: BrowsingContextDownload;
|
|
355
|
-
filepath: string | null;
|
|
356
|
-
};
|
|
340
|
+
export type BrowsingContextDownloadEndParams = BrowsingContextDownloadEndParams_CanceledParams | BrowsingContextDownloadEndParams_CompleteParams;
|
|
357
341
|
export interface BrowsingContextNavigationAborted {
|
|
358
342
|
method: "browsingContext.navigationAborted";
|
|
359
343
|
params: BrowsingContextNavigationInfo;
|
|
@@ -389,43 +373,246 @@ export interface BrowsingContextUserPromptOpenedParameters {
|
|
|
389
373
|
userContext?: BrowserUserContext;
|
|
390
374
|
defaultValue?: string;
|
|
391
375
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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
|
+
}>;
|
|
397
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
|
+
*/
|
|
398
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
|
+
*/
|
|
399
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
|
+
*/
|
|
400
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
|
+
*/
|
|
401
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
|
+
*/
|
|
402
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
|
+
*/
|
|
403
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
|
+
*/
|
|
404
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
|
+
*/
|
|
405
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
|
+
*/
|
|
406
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
|
+
*/
|
|
407
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
|
+
*/
|
|
408
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
|
+
*/
|
|
409
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
|
+
*/
|
|
410
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
|
+
*/
|
|
411
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
|
+
*/
|
|
412
617
|
traverseHistory(params: BrowsingContextTraverseHistoryParameters): Promise<void>;
|
|
413
|
-
onContextCreated(callback: (params: BrowsingContextInfo) => void): Promise<void>;
|
|
414
|
-
onContextDestroyed(callback: (params: BrowsingContextInfo) => void): Promise<void>;
|
|
415
|
-
onDomContentLoaded(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
416
|
-
onDownloadEnd(callback: (params: BrowsingContextDownloadEndParams) => void): Promise<void>;
|
|
417
|
-
onDownloadWillBegin(callback: (params: BrowsingContextDownloadWillBeginParams) => void): Promise<void>;
|
|
418
|
-
onFragmentNavigated(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
419
|
-
onHistoryUpdated(callback: (params: BrowsingContextHistoryUpdatedParameters) => void): Promise<void>;
|
|
420
|
-
onLoad(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
421
|
-
onNavigationAborted(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
422
|
-
onNavigationCommitted(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
423
|
-
onNavigationFailed(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
424
|
-
onNavigationStarted(callback: (params: BrowsingContextNavigationInfo) => void): Promise<void>;
|
|
425
|
-
onUserPromptClosed(callback: (params: BrowsingContextUserPromptClosedParameters) => void): Promise<void>;
|
|
426
|
-
onUserPromptOpened(callback: (params: BrowsingContextUserPromptOpenedParameters) => void): Promise<void>;
|
|
427
|
-
back(context: BrowsingContextBrowsingContext): Promise<void>;
|
|
428
|
-
forward(context: BrowsingContextBrowsingContext): Promise<void>;
|
|
429
|
-
getTopLevelContexts(): Promise<BrowsingContextGetTreeResult>;
|
|
430
|
-
printPage(params: BrowsingContextPrintParameters): Promise<BrowsingContextPrintResult>;
|
|
431
618
|
}
|