selenium-webdriver 4.45.0 → 4.47.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 +28 -0
- package/README.md +13 -10
- package/bidi/generated/browser.js +2 -2
- package/bidi/generated/browsing_context.d.ts +39 -2
- package/bidi/generated/browsing_context.js +22 -2
- package/bidi/generated/common.d.ts +1 -1
- package/bidi/generated/common.js +3 -0
- package/bidi/generated/emulation.d.ts +29 -2
- package/bidi/generated/emulation.js +18 -0
- package/bidi/generated/input.js +2 -2
- package/bidi/generated/log.js +2 -2
- package/bidi/generated/network.js +2 -2
- package/bidi/generated/script.d.ts +1 -1
- package/bidi/generated/script.js +2 -2
- package/bidi/generated/storage.js +2 -2
- package/bidi/generated/webextension.d.ts +5 -4
- package/bin/linux/selenium-manager +0 -0
- package/bin/macos/selenium-manager +0 -0
- package/bin/selenium-manager-THIRD-PARTY-NOTICES.txt +5971 -0
- package/bin/selenium-manager.cdx.json +11629 -0
- package/bin/windows/selenium-manager.exe +0 -0
- package/firefox.js +1 -0
- package/index.js +13 -0
- package/lib/atoms/find-elements.js +19 -1
- package/lib/atoms/get-attribute.js +19 -1
- package/lib/atoms/is-displayed.js +19 -1
- package/lib/proxy.js +3 -16
- package/lib/until.js +7 -9
- package/package.json +13 -13
package/CHANGES.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## 4.47.0
|
|
2
|
+
|
|
3
|
+
- Support CDP versions: v149, v150, v151
|
|
4
|
+
- link generated BiDi elements to their spec definitions (#17781)
|
|
5
|
+
- add objectOnly/preserveExtras/scalar-primitive BiDi schema signals (#17784)
|
|
6
|
+
- [build] Fix GeckoDriver rejecting system-access via capabilities (#17811)
|
|
7
|
+
- [build] standardize generated-file license and not to edit markers across generators (#17816)
|
|
8
|
+
- [build] Download and bundle Selenium Manager SBOM and NOTICE in each package (#17820)
|
|
9
|
+
- [build] BiDi schema generation cleanup (#17837)
|
|
10
|
+
- [build] Merge vendor cddl files into shared BiDi schema and implement custom Firefox webExtension options (#17840)
|
|
11
|
+
- [grid] honor client-advertised se:remoteUrl for reachable BiDi/CDP/VNC URLs (#17790)
|
|
12
|
+
- remove deprecated FTP proxy support (#17846)
|
|
13
|
+
- [bidi] Correct float/enum type fidelity in the shared schema and validate primitives outbound in Ruby (#17852)
|
|
14
|
+
- [bidi] mark BiDi types extensible per spec and update Ruby handling (#17853)
|
|
15
|
+
- validate BiDi outbound ref fields against their declared type (#17861)
|
|
16
|
+
- [build] derive per-type inbound/outbound directionality in the shared schema (#17864)
|
|
17
|
+
- [build] update node versioning for testing and publishing (#17866)
|
|
18
|
+
- Wait for async BiDi events and window resize in flaky tests (#17874)
|
|
19
|
+
- deprecate invalid Firefox profile code (#17871)
|
|
20
|
+
- [build] Automated Browser Version Update with CDP (#17873)
|
|
21
|
+
|
|
22
|
+
## 4.46.0
|
|
23
|
+
|
|
24
|
+
- Support CDP versions: v148, v149, v150
|
|
25
|
+
- Add binding-neutral BiDi schema with cddl2ts-gated fidelity (#17700)
|
|
26
|
+
- Update cddl to 0.21.0 to fix quoted reserved-word parsing in BiDi codegen (#17752)
|
|
27
|
+
- Add guidance for testing conventions in each language (#16734)
|
|
28
|
+
|
|
1
29
|
## 4.45.0
|
|
2
30
|
|
|
3
31
|
- Support CDP versions: v147, v148, v149
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
JavaScript language bindings for [Selenium WebDriver](https://www.selenium.dev).
|
|
4
4
|
Selenium automates browsers for testing and web-based task automation.
|
|
5
5
|
|
|
6
|
-
Requires Node.js >=
|
|
6
|
+
Requires Node.js >= 22.
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
@@ -63,17 +63,20 @@ SELENIUM_REMOTE_URL="http://localhost:4444" node script.js
|
|
|
63
63
|
|
|
64
64
|
## Node Support Policy
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
`selenium-webdriver` supports the Node.js versions under active upstream
|
|
67
|
+
support. Each is supported until its
|
|
68
|
+
[end-of-life](https://github.com/nodejs/release#release-schedule) date; after
|
|
69
|
+
that it is unsupported.
|
|
68
70
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
71
|
+
| Node.js | Support ends |
|
|
72
|
+
| :------ | :----------- |
|
|
73
|
+
| 22 | 2027-04-30 |
|
|
74
|
+
| 24 | 2028-04-30 |
|
|
75
|
+
| 26 | 2029-04-30 |
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
CI tests the earliest and latest supported versions available in
|
|
78
|
+
[rules_nodejs](https://github.com/bazel-contrib/rules_nodejs); issues and pull
|
|
79
|
+
requests are welcome for any supported version.
|
|
77
80
|
|
|
78
81
|
## Documentation
|
|
79
82
|
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
// specific language governing permissions and limitations
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.Browser =
|
|
19
|
+
exports.Browser = void 0;
|
|
20
|
+
exports.getBrowserInstance = getBrowserInstance;
|
|
20
21
|
// --- Additional Types ---
|
|
21
22
|
/** @deprecated Use {@link Browser.create} instead — will be removed in a future major version. */
|
|
22
23
|
async function getBrowserInstance(driver) {
|
|
23
24
|
return Browser.create(driver);
|
|
24
25
|
}
|
|
25
|
-
exports.getBrowserInstance = getBrowserInstance;
|
|
26
26
|
// --- Implementation ---
|
|
27
27
|
class Browser {
|
|
28
28
|
constructor(bidi) {
|
|
@@ -2,8 +2,8 @@ import type { BrowserClientWindow, BrowserUserContext } from './browser.js';
|
|
|
2
2
|
import type { EmptyResult, JsInt, JsUint } from './common.js';
|
|
3
3
|
import type { ScriptNodeRemoteValue, ScriptSerializationOptions, ScriptSharedReference } from './script.js';
|
|
4
4
|
import type { SessionUserPromptHandlerType } from './session.js';
|
|
5
|
-
export type BrowsingContextCommand = BrowsingContextActivate | BrowsingContextCaptureScreenshot | BrowsingContextClose | BrowsingContextCreate | BrowsingContextGetTree | BrowsingContextHandleUserPrompt | BrowsingContextLocateNodes | BrowsingContextNavigate | BrowsingContextPrint | BrowsingContextReload | BrowsingContextSetBypassCsp | BrowsingContextSetViewport | BrowsingContextTraverseHistory;
|
|
6
|
-
export type BrowsingContextResult = BrowsingContextActivateResult | BrowsingContextCaptureScreenshotResult | BrowsingContextCloseResult | BrowsingContextCreateResult | BrowsingContextGetTreeResult | BrowsingContextHandleUserPromptResult | BrowsingContextLocateNodesResult | BrowsingContextNavigateResult | BrowsingContextPrintResult | BrowsingContextReloadResult | BrowsingContextSetBypassCspResult | BrowsingContextSetViewportResult | BrowsingContextTraverseHistoryResult;
|
|
5
|
+
export type BrowsingContextCommand = BrowsingContextActivate | BrowsingContextCaptureScreenshot | BrowsingContextClose | BrowsingContextCreate | BrowsingContextGetTree | BrowsingContextHandleUserPrompt | BrowsingContextLocateNodes | BrowsingContextNavigate | BrowsingContextPrint | BrowsingContextReload | BrowsingContextSetBypassCsp | BrowsingContextSetViewport | BrowsingContextStartScreencast | BrowsingContextStopScreencast | BrowsingContextTraverseHistory;
|
|
6
|
+
export type BrowsingContextResult = BrowsingContextActivateResult | BrowsingContextCaptureScreenshotResult | BrowsingContextCloseResult | BrowsingContextCreateResult | BrowsingContextGetTreeResult | BrowsingContextHandleUserPromptResult | BrowsingContextLocateNodesResult | BrowsingContextNavigateResult | BrowsingContextPrintResult | BrowsingContextReloadResult | BrowsingContextSetBypassCspResult | BrowsingContextSetViewportResult | BrowsingContextStartScreencastResult | BrowsingContextStopScreencastResult | BrowsingContextTraverseHistoryResult;
|
|
7
7
|
export type BrowsingContextEvent = BrowsingContextContextCreated | BrowsingContextContextDestroyed | BrowsingContextDomContentLoaded | BrowsingContextDownloadEnd | BrowsingContextDownloadWillBegin | BrowsingContextFragmentNavigated | BrowsingContextHistoryUpdated | BrowsingContextLoad | BrowsingContextNavigationAborted | BrowsingContextNavigationCommitted | BrowsingContextNavigationFailed | BrowsingContextNavigationStarted | BrowsingContextUserPromptClosed | BrowsingContextUserPromptOpened;
|
|
8
8
|
export type BrowsingContextBrowsingContext = string;
|
|
9
9
|
export type BrowsingContextInfoList = BrowsingContextInfo[];
|
|
@@ -46,6 +46,7 @@ export interface BrowsingContextXPathLocator {
|
|
|
46
46
|
value: string;
|
|
47
47
|
}
|
|
48
48
|
export type BrowsingContextNavigation = string;
|
|
49
|
+
export type BrowsingContextDownload = string;
|
|
49
50
|
export interface BrowsingContextBaseNavigationInfo {
|
|
50
51
|
context: BrowsingContextBrowsingContext;
|
|
51
52
|
navigation: BrowsingContextNavigation | null;
|
|
@@ -257,6 +258,37 @@ export interface BrowsingContextViewport {
|
|
|
257
258
|
height: JsUint;
|
|
258
259
|
}
|
|
259
260
|
export type BrowsingContextSetViewportResult = EmptyResult;
|
|
261
|
+
export interface BrowsingContextStartScreencast {
|
|
262
|
+
method: "browsingContext.startScreencast";
|
|
263
|
+
params: BrowsingContextStartScreencastParameters;
|
|
264
|
+
}
|
|
265
|
+
export interface BrowsingContextStartScreencastParameters {
|
|
266
|
+
context: BrowsingContextBrowsingContext;
|
|
267
|
+
mimeType?: string;
|
|
268
|
+
video?: BrowsingContextMediaTrackConstraints;
|
|
269
|
+
audio?: boolean;
|
|
270
|
+
}
|
|
271
|
+
export interface BrowsingContextMediaTrackConstraints {
|
|
272
|
+
width?: JsUint;
|
|
273
|
+
height?: JsUint;
|
|
274
|
+
frameRate?: JsUint;
|
|
275
|
+
}
|
|
276
|
+
export interface BrowsingContextStartScreencastResult {
|
|
277
|
+
screencast: BrowsingContextScreencast;
|
|
278
|
+
path: string;
|
|
279
|
+
}
|
|
280
|
+
export type BrowsingContextScreencast = string;
|
|
281
|
+
export interface BrowsingContextStopScreencast {
|
|
282
|
+
method: "browsingContext.stopScreencast";
|
|
283
|
+
params: BrowsingContextStopScreencastParameters;
|
|
284
|
+
}
|
|
285
|
+
export interface BrowsingContextStopScreencastParameters {
|
|
286
|
+
screencast: BrowsingContextScreencast;
|
|
287
|
+
}
|
|
288
|
+
export interface BrowsingContextStopScreencastResult {
|
|
289
|
+
path: string;
|
|
290
|
+
error?: string;
|
|
291
|
+
}
|
|
260
292
|
export interface BrowsingContextTraverseHistory {
|
|
261
293
|
method: "browsingContext.traverseHistory";
|
|
262
294
|
params: BrowsingContextTraverseHistoryParameters;
|
|
@@ -305,6 +337,7 @@ export interface BrowsingContextDownloadWillBegin {
|
|
|
305
337
|
params: BrowsingContextDownloadWillBeginParams;
|
|
306
338
|
}
|
|
307
339
|
export type BrowsingContextDownloadWillBeginParams = BrowsingContextBaseNavigationInfo & {
|
|
340
|
+
download: BrowsingContextDownload;
|
|
308
341
|
suggestedFilename: string;
|
|
309
342
|
};
|
|
310
343
|
export interface BrowsingContextDownloadEnd {
|
|
@@ -314,9 +347,11 @@ export interface BrowsingContextDownloadEnd {
|
|
|
314
347
|
export type BrowsingContextDownloadEndParams = (BrowsingContextDownloadCanceledParams | BrowsingContextDownloadCompleteParams);
|
|
315
348
|
export type BrowsingContextDownloadCanceledParams = BrowsingContextBaseNavigationInfo & {
|
|
316
349
|
status: "canceled";
|
|
350
|
+
download: BrowsingContextDownload;
|
|
317
351
|
};
|
|
318
352
|
export type BrowsingContextDownloadCompleteParams = BrowsingContextBaseNavigationInfo & {
|
|
319
353
|
status: "complete";
|
|
354
|
+
download: BrowsingContextDownload;
|
|
320
355
|
filepath: string | null;
|
|
321
356
|
};
|
|
322
357
|
export interface BrowsingContextNavigationAborted {
|
|
@@ -372,6 +407,8 @@ export declare class BrowsingContext {
|
|
|
372
407
|
reload(params: BrowsingContextReloadParameters): Promise<BrowsingContextReloadResult>;
|
|
373
408
|
setBypassCSP(params: BrowsingContextSetBypassCspParameters): Promise<void>;
|
|
374
409
|
setViewport(params: BrowsingContextSetViewportParameters): Promise<void>;
|
|
410
|
+
startScreencast(params: BrowsingContextStartScreencastParameters): Promise<BrowsingContextStartScreencastResult>;
|
|
411
|
+
stopScreencast(params: BrowsingContextStopScreencastParameters): Promise<BrowsingContextStopScreencastResult>;
|
|
375
412
|
traverseHistory(params: BrowsingContextTraverseHistoryParameters): Promise<void>;
|
|
376
413
|
onContextCreated(callback: (params: BrowsingContextInfo) => void): Promise<void>;
|
|
377
414
|
onContextDestroyed(callback: (params: BrowsingContextInfo) => void): Promise<void>;
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
// specific language governing permissions and limitations
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.BrowsingContext =
|
|
19
|
+
exports.BrowsingContext = void 0;
|
|
20
|
+
exports.getBrowsingContextInstance = getBrowsingContextInstance;
|
|
20
21
|
// --- Additional Types ---
|
|
21
22
|
/** @deprecated Use {@link BrowsingContext.create} instead — will be removed in a future major version. */
|
|
22
23
|
async function getBrowsingContextInstance(driver) {
|
|
23
24
|
return BrowsingContext.create(driver);
|
|
24
25
|
}
|
|
25
|
-
exports.getBrowsingContextInstance = getBrowsingContextInstance;
|
|
26
26
|
// --- Implementation ---
|
|
27
27
|
class BrowsingContext {
|
|
28
28
|
constructor(bidi) {
|
|
@@ -151,6 +151,26 @@ class BrowsingContext {
|
|
|
151
151
|
throw new Error(`${response['error']}: ${response['message']}`);
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
+
async startScreencast(params) {
|
|
155
|
+
const response = await this.bidi.send({
|
|
156
|
+
method: 'browsingContext.startScreencast',
|
|
157
|
+
params: params,
|
|
158
|
+
});
|
|
159
|
+
if (response['type'] === 'error') {
|
|
160
|
+
throw new Error(`${response['error']}: ${response['message']}`);
|
|
161
|
+
}
|
|
162
|
+
return response.result;
|
|
163
|
+
}
|
|
164
|
+
async stopScreencast(params) {
|
|
165
|
+
const response = await this.bidi.send({
|
|
166
|
+
method: 'browsingContext.stopScreencast',
|
|
167
|
+
params: params,
|
|
168
|
+
});
|
|
169
|
+
if (response['type'] === 'error') {
|
|
170
|
+
throw new Error(`${response['error']}: ${response['message']}`);
|
|
171
|
+
}
|
|
172
|
+
return response.result;
|
|
173
|
+
}
|
|
154
174
|
async traverseHistory(params) {
|
|
155
175
|
const response = await this.bidi.send({
|
|
156
176
|
method: 'browsingContext.traverseHistory',
|
|
@@ -35,4 +35,4 @@ export type EventData = BrowsingContextEvent | InputEvent | LogEvent | NetworkEv
|
|
|
35
35
|
export type Extensible = Record<string, unknown>;
|
|
36
36
|
export type JsInt = number;
|
|
37
37
|
export type JsUint = number;
|
|
38
|
-
export type ErrorCode = "invalid argument" | "invalid selector" | "invalid session id" | "invalid web extension" | "move target out of bounds" | "no such alert" | "no such network collector" | "no such element" | "no such frame" | "no such handle" | "no such history entry" | "no such intercept" | "no such network data" | "no such node" | "no such request" | "no such script" | "no such storage partition" | "no such user context" | "no such web extension" | "session not created" | "unable to capture screen" | "unable to close browser" | "unable to set cookie" | "unable to set file input" | "unavailable network data" | "underspecified storage partition" | "unknown command" | "unknown error" | "unsupported operation";
|
|
38
|
+
export type ErrorCode = "invalid argument" | "invalid selector" | "invalid session id" | "invalid web extension" | "move target out of bounds" | "no such alert" | "no such network collector" | "no such element" | "no such frame" | "no such handle" | "no such history entry" | "no such intercept" | "no such network data" | "no such node" | "no such request" | "no such screencast" | "no such script" | "no such storage partition" | "no such user context" | "no such web extension" | "session not created" | "unable to capture screen" | "unable to close browser" | "unable to set cookie" | "unable to set file input" | "unavailable network data" | "underspecified storage partition" | "unknown command" | "unknown error" | "unsupported operation";
|
package/bidi/generated/common.js
CHANGED
|
@@ -28,3 +28,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
28
28
|
// (https://github.com/w3c/webref)
|
|
29
29
|
// Content was automatically extracted by Reffy into webref
|
|
30
30
|
// (https://github.com/w3c/webref)
|
|
31
|
+
// Local copy of w3c/webdriver-bidi#1140: adds the webExtension.install extension point.
|
|
32
|
+
// Overrides the upstream closed InstallParameters. Delete once #1140 merges and the
|
|
33
|
+
// pinned webref carries it. https://github.com/w3c/webdriver-bidi/pull/1140
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BrowserUserContext } from './browser.js';
|
|
2
2
|
import type { BrowsingContextBrowsingContext } from './browsing_context.js';
|
|
3
3
|
import type { EmptyResult, JsUint } from './common.js';
|
|
4
|
-
export type EmulationCommand = EmulationSetForcedColorsModeThemeOverride | EmulationSetGeolocationOverride | EmulationSetLocaleOverride | EmulationSetNetworkConditions | EmulationSetScreenOrientationOverride | EmulationSetScreenSettingsOverride | EmulationSetScriptingEnabled | EmulationSetScrollbarTypeOverride | EmulationSetTimezoneOverride | EmulationSetTouchOverride | EmulationSetUserAgentOverride;
|
|
5
|
-
export type EmulationResult = EmulationSetForcedColorsModeThemeOverrideResult | EmulationSetGeolocationOverrideResult | EmulationSetLocaleOverrideResult | EmulationSetScreenOrientationOverrideResult | EmulationSetScriptingEnabledResult | EmulationSetScrollbarTypeOverrideResult | EmulationSetTimezoneOverrideResult | EmulationSetTouchOverrideResult | EmulationSetUserAgentOverrideResult;
|
|
4
|
+
export type EmulationCommand = EmulationSetForcedColorsModeThemeOverride | EmulationSetGeolocationOverride | EmulationSetLocaleOverride | EmulationSetMediaFeaturesOverride | EmulationSetNetworkConditions | EmulationSetScreenOrientationOverride | EmulationSetScreenSettingsOverride | EmulationSetScriptingEnabled | EmulationSetScrollbarTypeOverride | EmulationSetTimezoneOverride | EmulationSetTouchOverride | EmulationSetUserAgentOverride | EmulationSetViewportMetaOverride;
|
|
5
|
+
export type EmulationResult = EmulationSetForcedColorsModeThemeOverrideResult | EmulationSetGeolocationOverrideResult | EmulationSetLocaleOverrideResult | EmulationSetMediaFeaturesOverrideResult | EmulationSetScreenOrientationOverrideResult | EmulationSetScriptingEnabledResult | EmulationSetScrollbarTypeOverrideResult | EmulationSetTimezoneOverrideResult | EmulationSetTouchOverrideResult | EmulationSetUserAgentOverrideResult | EmulationSetViewportMetaOverrideResult;
|
|
6
6
|
export interface EmulationSetForcedColorsModeThemeOverride {
|
|
7
7
|
method: "emulation.setForcedColorsModeThemeOverride";
|
|
8
8
|
params: EmulationSetForcedColorsModeThemeOverrideParameters;
|
|
@@ -64,6 +64,21 @@ export interface EmulationSetLocaleOverrideParameters {
|
|
|
64
64
|
userContexts?: BrowserUserContext[];
|
|
65
65
|
}
|
|
66
66
|
export type EmulationSetLocaleOverrideResult = EmptyResult;
|
|
67
|
+
export interface EmulationSetMediaFeaturesOverride {
|
|
68
|
+
method: "emulation.setMediaFeaturesOverride";
|
|
69
|
+
params: EmulationSetMediaFeaturesOverrideParameters;
|
|
70
|
+
}
|
|
71
|
+
export interface EmulationSetMediaFeaturesOverrideParameters {
|
|
72
|
+
features: EmulationMediaFeatures | null;
|
|
73
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
74
|
+
userContexts?: BrowserUserContext[];
|
|
75
|
+
}
|
|
76
|
+
export type EmulationMediaFeatures = EmulationMediaFeature[];
|
|
77
|
+
export interface EmulationMediaFeature {
|
|
78
|
+
name: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}
|
|
81
|
+
export type EmulationSetMediaFeaturesOverrideResult = EmptyResult;
|
|
67
82
|
export interface EmulationSetNetworkConditions {
|
|
68
83
|
method: "emulation.setNetworkConditions";
|
|
69
84
|
params: EmulationSetNetworkConditionsParameters;
|
|
@@ -118,6 +133,16 @@ export interface EmulationSetUserAgentOverrideParameters {
|
|
|
118
133
|
userContexts?: BrowserUserContext[];
|
|
119
134
|
}
|
|
120
135
|
export type EmulationSetUserAgentOverrideResult = EmptyResult;
|
|
136
|
+
export interface EmulationSetViewportMetaOverride {
|
|
137
|
+
method: "emulation.setViewportMetaOverride";
|
|
138
|
+
params: EmulationSetViewportMetaOverrideParameters;
|
|
139
|
+
}
|
|
140
|
+
export interface EmulationSetViewportMetaOverrideParameters {
|
|
141
|
+
viewportMeta: true | null;
|
|
142
|
+
contexts?: BrowsingContextBrowsingContext[];
|
|
143
|
+
userContexts?: BrowserUserContext[];
|
|
144
|
+
}
|
|
145
|
+
export type EmulationSetViewportMetaOverrideResult = EmptyResult;
|
|
121
146
|
export interface EmulationSetScriptingEnabled {
|
|
122
147
|
method: "emulation.setScriptingEnabled";
|
|
123
148
|
params: EmulationSetScriptingEnabledParameters;
|
|
@@ -165,6 +190,7 @@ export declare class Emulation {
|
|
|
165
190
|
setForcedColorsModeThemeOverride(params: EmulationSetForcedColorsModeThemeOverrideParameters): Promise<void>;
|
|
166
191
|
setGeolocationOverride(params: EmulationSetGeolocationOverrideParameters): Promise<void>;
|
|
167
192
|
setLocaleOverride(params: EmulationSetLocaleOverrideParameters): Promise<void>;
|
|
193
|
+
setMediaFeaturesOverride(params: EmulationSetMediaFeaturesOverrideParameters): Promise<void>;
|
|
168
194
|
setNetworkConditions(params: EmulationSetNetworkConditionsParameters): Promise<void>;
|
|
169
195
|
setScreenOrientationOverride(params: EmulationSetScreenOrientationOverrideParameters): Promise<void>;
|
|
170
196
|
setScreenSettingsOverride(params: EmulationSetScreenSettingsOverrideParameters): Promise<void>;
|
|
@@ -173,4 +199,5 @@ export declare class Emulation {
|
|
|
173
199
|
setTimezoneOverride(params: EmulationSetTimezoneOverrideParameters): Promise<void>;
|
|
174
200
|
setTouchOverride(params: EmulationSetTouchOverrideParameters): Promise<void>;
|
|
175
201
|
setUserAgentOverride(params: EmulationSetUserAgentOverrideParameters): Promise<void>;
|
|
202
|
+
setViewportMetaOverride(params: EmulationSetViewportMetaOverrideParameters): Promise<void>;
|
|
176
203
|
}
|
|
@@ -57,6 +57,15 @@ class Emulation {
|
|
|
57
57
|
throw new Error(`${response['error']}: ${response['message']}`);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
async setMediaFeaturesOverride(params) {
|
|
61
|
+
const response = await this.bidi.send({
|
|
62
|
+
method: 'emulation.setMediaFeaturesOverride',
|
|
63
|
+
params: params,
|
|
64
|
+
});
|
|
65
|
+
if (response['type'] === 'error') {
|
|
66
|
+
throw new Error(`${response['error']}: ${response['message']}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
60
69
|
async setNetworkConditions(params) {
|
|
61
70
|
const response = await this.bidi.send({
|
|
62
71
|
method: 'emulation.setNetworkConditions',
|
|
@@ -129,5 +138,14 @@ class Emulation {
|
|
|
129
138
|
throw new Error(`${response['error']}: ${response['message']}`);
|
|
130
139
|
}
|
|
131
140
|
}
|
|
141
|
+
async setViewportMetaOverride(params) {
|
|
142
|
+
const response = await this.bidi.send({
|
|
143
|
+
method: 'emulation.setViewportMetaOverride',
|
|
144
|
+
params: params,
|
|
145
|
+
});
|
|
146
|
+
if (response['type'] === 'error') {
|
|
147
|
+
throw new Error(`${response['error']}: ${response['message']}`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
132
150
|
}
|
|
133
151
|
exports.Emulation = Emulation;
|
package/bidi/generated/input.js
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
// specific language governing permissions and limitations
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.Input =
|
|
19
|
+
exports.Input = void 0;
|
|
20
|
+
exports.getInputInstance = getInputInstance;
|
|
20
21
|
// --- Additional Types ---
|
|
21
22
|
/** @deprecated Use {@link Input.create} instead — will be removed in a future major version. */
|
|
22
23
|
async function getInputInstance(driver) {
|
|
23
24
|
return Input.create(driver);
|
|
24
25
|
}
|
|
25
|
-
exports.getInputInstance = getInputInstance;
|
|
26
26
|
// --- Implementation ---
|
|
27
27
|
class Input {
|
|
28
28
|
constructor(bidi) {
|
package/bidi/generated/log.js
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
// specific language governing permissions and limitations
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.Log =
|
|
19
|
+
exports.Log = void 0;
|
|
20
|
+
exports.getLogInspectorInstance = getLogInspectorInstance;
|
|
20
21
|
// --- Additional Types ---
|
|
21
22
|
/** @deprecated Use {@link Log.create} instead — will be removed in a future major version. */
|
|
22
23
|
async function getLogInspectorInstance(driver) {
|
|
23
24
|
return Log.create(driver);
|
|
24
25
|
}
|
|
25
|
-
exports.getLogInspectorInstance = getLogInspectorInstance;
|
|
26
26
|
// --- Implementation ---
|
|
27
27
|
class Log {
|
|
28
28
|
constructor(bidi) {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
// specific language governing permissions and limitations
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.Network =
|
|
19
|
+
exports.Network = void 0;
|
|
20
|
+
exports.getNetworkInstance = getNetworkInstance;
|
|
20
21
|
// --- Additional Types ---
|
|
21
22
|
/** @deprecated Use {@link Network.create} instead — will be removed in a future major version. */
|
|
22
23
|
async function getNetworkInstance(driver) {
|
|
23
24
|
return Network.create(driver);
|
|
24
25
|
}
|
|
25
|
-
exports.getNetworkInstance = getNetworkInstance;
|
|
26
26
|
// --- Implementation ---
|
|
27
27
|
class Network {
|
|
28
28
|
constructor(bidi) {
|
package/bidi/generated/script.js
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
// specific language governing permissions and limitations
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.Script =
|
|
19
|
+
exports.Script = void 0;
|
|
20
|
+
exports.getScriptManagerInstance = getScriptManagerInstance;
|
|
20
21
|
// --- Additional Types ---
|
|
21
22
|
/** @deprecated Use {@link Script.create} instead — will be removed in a future major version. */
|
|
22
23
|
async function getScriptManagerInstance(driver) {
|
|
23
24
|
return Script.create(driver);
|
|
24
25
|
}
|
|
25
|
-
exports.getScriptManagerInstance = getScriptManagerInstance;
|
|
26
26
|
// --- Implementation ---
|
|
27
27
|
class Script {
|
|
28
28
|
constructor(bidi) {
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
// specific language governing permissions and limitations
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.Storage =
|
|
19
|
+
exports.Storage = void 0;
|
|
20
|
+
exports.getStorageInstance = getStorageInstance;
|
|
20
21
|
// --- Additional Types ---
|
|
21
22
|
/** @deprecated Use {@link Storage.create} instead — will be removed in a future major version. */
|
|
22
23
|
async function getStorageInstance(driver) {
|
|
23
24
|
return Storage.create(driver);
|
|
24
25
|
}
|
|
25
|
-
exports.getStorageInstance = getStorageInstance;
|
|
26
26
|
// --- Implementation ---
|
|
27
27
|
class Storage {
|
|
28
28
|
constructor(bidi) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EmptyResult } from './common.js';
|
|
1
|
+
import type { EmptyResult, Extensible } from './common.js';
|
|
2
2
|
export type WebExtensionCommand = WebExtensionInstall | WebExtensionUninstall;
|
|
3
3
|
export type WebExtensionResult = WebExtensionInstallResult | WebExtensionUninstallResult;
|
|
4
4
|
export type WebExtensionExtension = string;
|
|
@@ -6,9 +6,6 @@ export interface WebExtensionInstall {
|
|
|
6
6
|
method: "webExtension.install";
|
|
7
7
|
params: WebExtensionInstallParameters;
|
|
8
8
|
}
|
|
9
|
-
export interface WebExtensionInstallParameters {
|
|
10
|
-
extensionData: WebExtensionExtensionData;
|
|
11
|
-
}
|
|
12
9
|
export type WebExtensionExtensionData = WebExtensionExtensionArchivePath | WebExtensionExtensionBase64Encoded | WebExtensionExtensionPath;
|
|
13
10
|
export interface WebExtensionExtensionPath {
|
|
14
11
|
type: "path";
|
|
@@ -33,6 +30,10 @@ export interface WebExtensionUninstallParameters {
|
|
|
33
30
|
extension: WebExtensionExtension;
|
|
34
31
|
}
|
|
35
32
|
export type WebExtensionUninstallResult = EmptyResult;
|
|
33
|
+
export type WebExtensionInstallParameters = WebExtensionInstallParametersExtension & {
|
|
34
|
+
extensionData: WebExtensionExtensionData;
|
|
35
|
+
};
|
|
36
|
+
export type WebExtensionInstallParametersExtension = Extensible;
|
|
36
37
|
export declare class WebExtension {
|
|
37
38
|
private readonly bidi;
|
|
38
39
|
private constructor();
|
|
Binary file
|
|
Binary file
|