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,38 +1,122 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
4
|
-
import
|
|
5
|
-
import type {
|
|
6
|
-
import
|
|
7
|
-
import type {
|
|
8
|
-
import
|
|
9
|
-
import type {
|
|
10
|
-
import
|
|
11
|
-
|
|
1
|
+
import type { BluetoothCharacteristicEventGenerated, BluetoothDescriptorEventGenerated, BluetoothDisableSimulation, BluetoothGattConnectionAttempted, BluetoothHandleRequestDevicePrompt, BluetoothRequestDevicePromptUpdated, BluetoothSimulateAdapter, BluetoothSimulateAdvertisement, BluetoothSimulateCharacteristic, BluetoothSimulateCharacteristicResponse, BluetoothSimulateDescriptor, BluetoothSimulateDescriptorResponse, BluetoothSimulateGattConnectionResponse, BluetoothSimulateGattDisconnection, BluetoothSimulatePreconnectedPeripheral, BluetoothSimulateService } from './bluetooth.js';
|
|
2
|
+
import './bluetooth.js';
|
|
3
|
+
import type { BrowserClose, BrowserCloseResult, BrowserCreateUserContext, BrowserCreateUserContextResult, BrowserGetClientWindows, BrowserGetClientWindowsResult, BrowserGetUserContexts, BrowserGetUserContextsResult, BrowserRemoveUserContext, BrowserRemoveUserContextResult, BrowserSetClientWindowState, BrowserSetClientWindowStateResult, BrowserSetDownloadBehavior, BrowserSetDownloadBehaviorResult } from './browser.js';
|
|
4
|
+
import './browser.js';
|
|
5
|
+
import type { BrowsingContextActivate, BrowsingContextActivateResult, BrowsingContextCaptureScreenshot, BrowsingContextCaptureScreenshotResult, BrowsingContextClose, BrowsingContextCloseResult, BrowsingContextContextCreated, BrowsingContextContextDestroyed, BrowsingContextCreate, BrowsingContextCreateResult, BrowsingContextDomContentLoaded, BrowsingContextDownloadEnd, BrowsingContextDownloadWillBegin, BrowsingContextFragmentNavigated, BrowsingContextGetTree, BrowsingContextGetTreeResult, BrowsingContextHandleUserPrompt, BrowsingContextHandleUserPromptResult, BrowsingContextHistoryUpdated, BrowsingContextLoad, BrowsingContextLocateNodes, BrowsingContextLocateNodesResult, BrowsingContextNavigate, BrowsingContextNavigateResult, BrowsingContextNavigationAborted, BrowsingContextNavigationCommitted, BrowsingContextNavigationFailed, BrowsingContextNavigationStarted, BrowsingContextPrint, BrowsingContextPrintResult, BrowsingContextReload, BrowsingContextReloadResult, BrowsingContextSetBypassCsp, BrowsingContextSetBypassCspResult, BrowsingContextSetViewport, BrowsingContextSetViewportResult, BrowsingContextStartScreencast, BrowsingContextStartScreencastResult, BrowsingContextStopScreencast, BrowsingContextStopScreencastResult, BrowsingContextTraverseHistory, BrowsingContextTraverseHistoryResult, BrowsingContextUserPromptClosed, BrowsingContextUserPromptOpened } from './browsing_context.js';
|
|
6
|
+
import './browsing_context.js';
|
|
7
|
+
import type { DigitalCredentialsSetVirtualWalletBehavior } from './digital_credentials.js';
|
|
8
|
+
import './digital_credentials.js';
|
|
9
|
+
import type { EmulationSetForcedColorsModeThemeOverride, EmulationSetForcedColorsModeThemeOverrideResult, EmulationSetGeolocationOverride, EmulationSetGeolocationOverrideResult, EmulationSetLocaleOverride, EmulationSetLocaleOverrideResult, EmulationSetMediaFeaturesOverride, EmulationSetMediaFeaturesOverrideResult, EmulationSetNetworkConditions, EmulationSetScreenOrientationOverride, EmulationSetScreenOrientationOverrideResult, EmulationSetScreenSettingsOverride, EmulationSetScriptingEnabled, EmulationSetScriptingEnabledResult, EmulationSetScrollbarTypeOverride, EmulationSetScrollbarTypeOverrideResult, EmulationSetTextLayoutModeOverride, EmulationSetTextLayoutModeOverrideResult, EmulationSetTimezoneOverride, EmulationSetTimezoneOverrideResult, EmulationSetTouchOverride, EmulationSetTouchOverrideResult, EmulationSetUserAgentOverride, EmulationSetUserAgentOverrideResult, EmulationSetViewportMetaOverride, EmulationSetViewportMetaOverrideResult } from './emulation.js';
|
|
10
|
+
import './emulation.js';
|
|
11
|
+
import type { InputFileDialogOpened, InputPerformActions, InputPerformActionsResult, InputReleaseActions, InputReleaseActionsResult, InputSetFiles, InputSetFilesResult } from './input.js';
|
|
12
|
+
import './input.js';
|
|
13
|
+
import type { LogEntryAdded } from './log.js';
|
|
14
|
+
import './log.js';
|
|
15
|
+
import type { NetworkAddDataCollector, NetworkAddDataCollectorResult, NetworkAddIntercept, NetworkAddInterceptResult, NetworkAuthRequired, NetworkBeforeRequestSent, NetworkContinueRequest, NetworkContinueRequestResult, NetworkContinueResponse, NetworkContinueResponseResult, NetworkContinueWithAuth, NetworkContinueWithAuthResult, NetworkDisownData, NetworkDisownDataResult, NetworkFailRequest, NetworkFailRequestResult, NetworkFetchError, NetworkGetData, NetworkGetDataResult, NetworkProvideResponse, NetworkProvideResponseResult, NetworkRemoveDataCollector, NetworkRemoveDataCollectorResult, NetworkRemoveIntercept, NetworkRemoveInterceptResult, NetworkResponseCompleted, NetworkResponseStarted, NetworkSetCacheBehavior, NetworkSetCacheBehaviorResult, NetworkSetExtraHeaders, NetworkSetExtraHeadersResult } from './network.js';
|
|
16
|
+
import './network.js';
|
|
17
|
+
import type { PermissionsSetPermission } from './permissions.js';
|
|
18
|
+
import './permissions.js';
|
|
19
|
+
import type { ScriptAddPreloadScript, ScriptAddPreloadScriptResult, ScriptCallFunction, ScriptCallFunctionResult, ScriptDisown, ScriptDisownResult, ScriptEvaluate, ScriptEvaluateResult, ScriptGetRealms, ScriptGetRealmsResult, ScriptMessage, ScriptRealmCreated, ScriptRealmDestroyed, ScriptRemovePreloadScript, ScriptRemovePreloadScriptResult } from './script.js';
|
|
20
|
+
import './script.js';
|
|
21
|
+
import type { SessionEnd, SessionEndResult, SessionNew, SessionNewResult, SessionStatus, SessionStatusResult, SessionSubscribe, SessionSubscribeResult, SessionUnsubscribe, SessionUnsubscribeResult } from './session.js';
|
|
22
|
+
import './session.js';
|
|
23
|
+
import type { SpeculationPrefetchStatusUpdated } from './speculation.js';
|
|
24
|
+
import './speculation.js';
|
|
25
|
+
import type { StorageDeleteCookies, StorageDeleteCookiesResult, StorageGetCookies, StorageGetCookiesResult, StorageSetCookie, StorageSetCookieResult } from './storage.js';
|
|
26
|
+
import './storage.js';
|
|
27
|
+
import type { UserAgentClientHintsSetClientHintsOverrideCommand } from './user_agent_client_hints.js';
|
|
28
|
+
import './user_agent_client_hints.js';
|
|
29
|
+
import type { WebExtensionInstall, WebExtensionInstallResult, WebExtensionUninstall, WebExtensionUninstallResult } from './webextension.js';
|
|
30
|
+
import './webextension.js';
|
|
31
|
+
export interface Command {
|
|
12
32
|
id: JsUint;
|
|
13
|
-
}
|
|
33
|
+
}
|
|
14
34
|
export type CommandData = BrowserCommand | BrowsingContextCommand | EmulationCommand | InputCommand | NetworkCommand | ScriptCommand | SessionCommand | StorageCommand | WebExtensionCommand;
|
|
15
|
-
export
|
|
35
|
+
export interface EmptyParams {
|
|
36
|
+
}
|
|
16
37
|
export type Message = CommandResponse | ErrorResponse | Event;
|
|
17
|
-
export
|
|
38
|
+
export interface CommandResponse {
|
|
18
39
|
type: "success";
|
|
19
40
|
id: JsUint;
|
|
20
41
|
result: ResultData;
|
|
21
|
-
}
|
|
22
|
-
export
|
|
42
|
+
}
|
|
43
|
+
export interface ErrorResponse {
|
|
23
44
|
type: "error";
|
|
24
45
|
id: JsUint | null;
|
|
25
46
|
error: ErrorCode;
|
|
26
47
|
message: string;
|
|
27
48
|
stacktrace?: string;
|
|
28
|
-
}
|
|
49
|
+
}
|
|
29
50
|
export type ResultData = BrowserResult | BrowsingContextResult | EmulationResult | InputResult | NetworkResult | ScriptResult | SessionResult | StorageResult | WebExtensionResult;
|
|
30
|
-
export
|
|
31
|
-
|
|
51
|
+
export interface EmptyResult {
|
|
52
|
+
}
|
|
53
|
+
export interface Event {
|
|
32
54
|
type: "event";
|
|
33
|
-
}
|
|
55
|
+
}
|
|
34
56
|
export type EventData = BrowsingContextEvent | InputEvent | LogEvent | NetworkEvent | ScriptEvent;
|
|
35
|
-
export
|
|
57
|
+
export interface Extensible {
|
|
58
|
+
}
|
|
36
59
|
export type JsInt = number;
|
|
37
60
|
export type JsUint = number;
|
|
38
61
|
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";
|
|
62
|
+
export type SessionCommand = SessionEnd | SessionNew | SessionStatus | SessionSubscribe | SessionUnsubscribe;
|
|
63
|
+
export type SessionResult = SessionEndResult | SessionNewResult | SessionStatusResult | SessionSubscribeResult | SessionUnsubscribeResult;
|
|
64
|
+
export type BrowserCommand = BrowserClose | BrowserCreateUserContext | BrowserGetClientWindows | BrowserGetUserContexts | BrowserRemoveUserContext | BrowserSetClientWindowState | BrowserSetDownloadBehavior;
|
|
65
|
+
export type BrowserResult = BrowserCloseResult | BrowserCreateUserContextResult | BrowserGetClientWindowsResult | BrowserGetUserContextsResult | BrowserRemoveUserContextResult | BrowserSetClientWindowStateResult | BrowserSetDownloadBehaviorResult;
|
|
66
|
+
export type BrowsingContextCommand = BrowsingContextActivate | BrowsingContextCaptureScreenshot | BrowsingContextClose | BrowsingContextCreate | BrowsingContextGetTree | BrowsingContextHandleUserPrompt | BrowsingContextLocateNodes | BrowsingContextNavigate | BrowsingContextPrint | BrowsingContextReload | BrowsingContextSetBypassCsp | BrowsingContextSetViewport | BrowsingContextStartScreencast | BrowsingContextStopScreencast | BrowsingContextTraverseHistory;
|
|
67
|
+
export type BrowsingContextResult = BrowsingContextActivateResult | BrowsingContextCaptureScreenshotResult | BrowsingContextCloseResult | BrowsingContextCreateResult | BrowsingContextGetTreeResult | BrowsingContextHandleUserPromptResult | BrowsingContextLocateNodesResult | BrowsingContextNavigateResult | BrowsingContextPrintResult | BrowsingContextReloadResult | BrowsingContextSetBypassCspResult | BrowsingContextSetViewportResult | BrowsingContextStartScreencastResult | BrowsingContextStopScreencastResult | BrowsingContextTraverseHistoryResult;
|
|
68
|
+
export type BrowsingContextEvent = BrowsingContextContextCreated | BrowsingContextContextDestroyed | BrowsingContextDomContentLoaded | BrowsingContextDownloadEnd | BrowsingContextDownloadWillBegin | BrowsingContextFragmentNavigated | BrowsingContextHistoryUpdated | BrowsingContextLoad | BrowsingContextNavigationAborted | BrowsingContextNavigationCommitted | BrowsingContextNavigationFailed | BrowsingContextNavigationStarted | BrowsingContextUserPromptClosed | BrowsingContextUserPromptOpened;
|
|
69
|
+
export type EmulationCommand = EmulationSetForcedColorsModeThemeOverride | EmulationSetGeolocationOverride | EmulationSetLocaleOverride | EmulationSetMediaFeaturesOverride | EmulationSetNetworkConditions | EmulationSetScreenOrientationOverride | EmulationSetScreenSettingsOverride | EmulationSetScriptingEnabled | EmulationSetScrollbarTypeOverride | EmulationSetTextLayoutModeOverride | EmulationSetTimezoneOverride | EmulationSetTouchOverride | EmulationSetUserAgentOverride | EmulationSetViewportMetaOverride;
|
|
70
|
+
export type EmulationResult = EmulationSetForcedColorsModeThemeOverrideResult | EmulationSetGeolocationOverrideResult | EmulationSetLocaleOverrideResult | EmulationSetMediaFeaturesOverrideResult | EmulationSetScreenOrientationOverrideResult | EmulationSetScriptingEnabledResult | EmulationSetScrollbarTypeOverrideResult | EmulationSetTextLayoutModeOverrideResult | EmulationSetTimezoneOverrideResult | EmulationSetTouchOverrideResult | EmulationSetUserAgentOverrideResult | EmulationSetViewportMetaOverrideResult;
|
|
71
|
+
export type NetworkCommand = NetworkAddDataCollector | NetworkAddIntercept | NetworkContinueRequest | NetworkContinueResponse | NetworkContinueWithAuth | NetworkDisownData | NetworkFailRequest | NetworkGetData | NetworkProvideResponse | NetworkRemoveDataCollector | NetworkRemoveIntercept | NetworkSetCacheBehavior | NetworkSetExtraHeaders;
|
|
72
|
+
export type NetworkResult = NetworkAddDataCollectorResult | NetworkAddInterceptResult | NetworkContinueRequestResult | NetworkContinueResponseResult | NetworkContinueWithAuthResult | NetworkDisownDataResult | NetworkFailRequestResult | NetworkGetDataResult | NetworkProvideResponseResult | NetworkRemoveDataCollectorResult | NetworkRemoveInterceptResult | NetworkSetCacheBehaviorResult | NetworkSetExtraHeadersResult;
|
|
73
|
+
export type NetworkEvent = NetworkAuthRequired | NetworkBeforeRequestSent | NetworkFetchError | NetworkResponseCompleted | NetworkResponseStarted;
|
|
74
|
+
export type ScriptCommand = ScriptAddPreloadScript | ScriptCallFunction | ScriptDisown | ScriptEvaluate | ScriptGetRealms | ScriptRemovePreloadScript;
|
|
75
|
+
export type ScriptResult = ScriptAddPreloadScriptResult | ScriptCallFunctionResult | ScriptDisownResult | ScriptEvaluateResult | ScriptGetRealmsResult | ScriptRemovePreloadScriptResult;
|
|
76
|
+
export type ScriptEvent = ScriptMessage | ScriptRealmCreated | ScriptRealmDestroyed;
|
|
77
|
+
export type StorageCommand = StorageDeleteCookies | StorageGetCookies | StorageSetCookie;
|
|
78
|
+
export type StorageResult = StorageDeleteCookiesResult | StorageGetCookiesResult | StorageSetCookieResult;
|
|
79
|
+
export type LogEvent = LogEntryAdded;
|
|
80
|
+
export type InputCommand = InputPerformActions | InputReleaseActions | InputSetFiles;
|
|
81
|
+
export type InputResult = InputPerformActionsResult | InputReleaseActionsResult | InputSetFilesResult;
|
|
82
|
+
export type InputEvent = InputFileDialogOpened;
|
|
83
|
+
export type WebExtensionCommand = WebExtensionInstall | WebExtensionUninstall;
|
|
84
|
+
export type WebExtensionResult = WebExtensionInstallResult | WebExtensionUninstallResult;
|
|
85
|
+
export type PermissionsCommand = PermissionsSetPermission;
|
|
86
|
+
export type SpeculationEvent = SpeculationPrefetchStatusUpdated;
|
|
87
|
+
export type UserAgentClientHintsCommand = UserAgentClientHintsSetClientHintsOverrideCommand;
|
|
88
|
+
export type BluetoothCommand = BluetoothHandleRequestDevicePrompt | BluetoothSimulateAdapter | BluetoothDisableSimulation | BluetoothSimulatePreconnectedPeripheral | BluetoothSimulateAdvertisement | BluetoothSimulateGattConnectionResponse | BluetoothSimulateGattDisconnection | BluetoothSimulateService | BluetoothSimulateCharacteristic | BluetoothSimulateCharacteristicResponse | BluetoothSimulateDescriptor | BluetoothSimulateDescriptorResponse;
|
|
89
|
+
export type DigitalCredentialsCommand = DigitalCredentialsSetVirtualWalletBehavior;
|
|
90
|
+
export type BluetoothEvent = BluetoothRequestDevicePromptUpdated | BluetoothGattConnectionAttempted | BluetoothCharacteristicEventGenerated | BluetoothDescriptorEventGenerated;
|
|
91
|
+
export declare const ErrorCode: Readonly<{
|
|
92
|
+
readonly INVALID_ARGUMENT: "invalid argument";
|
|
93
|
+
readonly INVALID_SELECTOR: "invalid selector";
|
|
94
|
+
readonly INVALID_SESSION_ID: "invalid session id";
|
|
95
|
+
readonly INVALID_WEB_EXTENSION: "invalid web extension";
|
|
96
|
+
readonly MOVE_TARGET_OUT_OF_BOUNDS: "move target out of bounds";
|
|
97
|
+
readonly NO_SUCH_ALERT: "no such alert";
|
|
98
|
+
readonly NO_SUCH_NETWORK_COLLECTOR: "no such network collector";
|
|
99
|
+
readonly NO_SUCH_ELEMENT: "no such element";
|
|
100
|
+
readonly NO_SUCH_FRAME: "no such frame";
|
|
101
|
+
readonly NO_SUCH_HANDLE: "no such handle";
|
|
102
|
+
readonly NO_SUCH_HISTORY_ENTRY: "no such history entry";
|
|
103
|
+
readonly NO_SUCH_INTERCEPT: "no such intercept";
|
|
104
|
+
readonly NO_SUCH_NETWORK_DATA: "no such network data";
|
|
105
|
+
readonly NO_SUCH_NODE: "no such node";
|
|
106
|
+
readonly NO_SUCH_REQUEST: "no such request";
|
|
107
|
+
readonly NO_SUCH_SCREENCAST: "no such screencast";
|
|
108
|
+
readonly NO_SUCH_SCRIPT: "no such script";
|
|
109
|
+
readonly NO_SUCH_STORAGE_PARTITION: "no such storage partition";
|
|
110
|
+
readonly NO_SUCH_USER_CONTEXT: "no such user context";
|
|
111
|
+
readonly NO_SUCH_WEB_EXTENSION: "no such web extension";
|
|
112
|
+
readonly SESSION_NOT_CREATED: "session not created";
|
|
113
|
+
readonly UNABLE_TO_CAPTURE_SCREEN: "unable to capture screen";
|
|
114
|
+
readonly UNABLE_TO_CLOSE_BROWSER: "unable to close browser";
|
|
115
|
+
readonly UNABLE_TO_SET_COOKIE: "unable to set cookie";
|
|
116
|
+
readonly UNABLE_TO_SET_FILE_INPUT: "unable to set file input";
|
|
117
|
+
readonly UNAVAILABLE_NETWORK_DATA: "unavailable network data";
|
|
118
|
+
readonly UNDERSPECIFIED_STORAGE_PARTITION: "underspecified storage partition";
|
|
119
|
+
readonly UNKNOWN_COMMAND: "unknown command";
|
|
120
|
+
readonly UNKNOWN_ERROR: "unknown error";
|
|
121
|
+
readonly UNSUPPORTED_OPERATION: "unsupported operation";
|
|
122
|
+
}>;
|
package/bidi/generated/common.js
CHANGED
|
@@ -16,18 +16,67 @@
|
|
|
16
16
|
// specific language governing permissions and limitations
|
|
17
17
|
// under the License.
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
exports.ErrorCode = void 0;
|
|
20
|
+
require("./bluetooth.js");
|
|
21
|
+
require("./browser.js");
|
|
22
|
+
require("./browsing_context.js");
|
|
23
|
+
require("./digital_credentials.js");
|
|
24
|
+
require("./emulation.js");
|
|
25
|
+
require("./input.js");
|
|
26
|
+
require("./log.js");
|
|
27
|
+
require("./network.js");
|
|
28
|
+
require("./permissions.js");
|
|
29
|
+
require("./script.js");
|
|
30
|
+
require("./session.js");
|
|
31
|
+
require("./speculation.js");
|
|
32
|
+
require("./storage.js");
|
|
33
|
+
require("./user_agent_client_hints.js");
|
|
34
|
+
require("./webextension.js");
|
|
35
|
+
const record_js_1 = require("../serialization/record.js");
|
|
36
|
+
const enum_js_1 = require("../serialization/enum.js");
|
|
37
|
+
const union_js_1 = require("../serialization/union.js");
|
|
38
|
+
const Command = (0, record_js_1.defineRecord)('Command', [{ "name": "id", "wire": "id", "required": true, "type": { "ref": "js-uint" } }]);
|
|
39
|
+
const CommandDataUnion = (0, union_js_1.defineUnion)('CommandData', { "by": "method", "variants": [{ "value": "browser.close", "ref": "browser.Close" }, { "value": "browser.createUserContext", "ref": "browser.CreateUserContext" }, { "value": "browser.getClientWindows", "ref": "browser.GetClientWindows" }, { "value": "browser.getUserContexts", "ref": "browser.GetUserContexts" }, { "value": "browser.removeUserContext", "ref": "browser.RemoveUserContext" }, { "value": "browser.setClientWindowState", "ref": "browser.SetClientWindowState" }, { "value": "browser.setDownloadBehavior", "ref": "browser.SetDownloadBehavior" }, { "value": "browsingContext.activate", "ref": "browsingContext.Activate" }, { "value": "browsingContext.captureScreenshot", "ref": "browsingContext.CaptureScreenshot" }, { "value": "browsingContext.close", "ref": "browsingContext.Close" }, { "value": "browsingContext.create", "ref": "browsingContext.Create" }, { "value": "browsingContext.getTree", "ref": "browsingContext.GetTree" }, { "value": "browsingContext.handleUserPrompt", "ref": "browsingContext.HandleUserPrompt" }, { "value": "browsingContext.locateNodes", "ref": "browsingContext.LocateNodes" }, { "value": "browsingContext.navigate", "ref": "browsingContext.Navigate" }, { "value": "browsingContext.print", "ref": "browsingContext.Print" }, { "value": "browsingContext.reload", "ref": "browsingContext.Reload" }, { "value": "browsingContext.setBypassCSP", "ref": "browsingContext.SetBypassCSP" }, { "value": "browsingContext.setViewport", "ref": "browsingContext.SetViewport" }, { "value": "browsingContext.startScreencast", "ref": "browsingContext.StartScreencast" }, { "value": "browsingContext.stopScreencast", "ref": "browsingContext.StopScreencast" }, { "value": "browsingContext.traverseHistory", "ref": "browsingContext.TraverseHistory" }, { "value": "emulation.setForcedColorsModeThemeOverride", "ref": "emulation.SetForcedColorsModeThemeOverride" }, { "value": "emulation.setGeolocationOverride", "ref": "emulation.SetGeolocationOverride" }, { "value": "emulation.setLocaleOverride", "ref": "emulation.SetLocaleOverride" }, { "value": "emulation.setMediaFeaturesOverride", "ref": "emulation.SetMediaFeaturesOverride" }, { "value": "emulation.setNetworkConditions", "ref": "emulation.SetNetworkConditions" }, { "value": "emulation.setScreenOrientationOverride", "ref": "emulation.SetScreenOrientationOverride" }, { "value": "emulation.setScreenSettingsOverride", "ref": "emulation.SetScreenSettingsOverride" }, { "value": "emulation.setScriptingEnabled", "ref": "emulation.SetScriptingEnabled" }, { "value": "emulation.setScrollbarTypeOverride", "ref": "emulation.SetScrollbarTypeOverride" }, { "value": "emulation.setTextLayoutModeOverride", "ref": "emulation.SetTextLayoutModeOverride" }, { "value": "emulation.setTimezoneOverride", "ref": "emulation.SetTimezoneOverride" }, { "value": "emulation.setTouchOverride", "ref": "emulation.SetTouchOverride" }, { "value": "emulation.setUserAgentOverride", "ref": "emulation.SetUserAgentOverride" }, { "value": "emulation.setViewportMetaOverride", "ref": "emulation.SetViewportMetaOverride" }, { "value": "input.performActions", "ref": "input.PerformActions" }, { "value": "input.releaseActions", "ref": "input.ReleaseActions" }, { "value": "input.setFiles", "ref": "input.SetFiles" }, { "value": "network.addDataCollector", "ref": "network.AddDataCollector" }, { "value": "network.addIntercept", "ref": "network.AddIntercept" }, { "value": "network.continueRequest", "ref": "network.ContinueRequest" }, { "value": "network.continueResponse", "ref": "network.ContinueResponse" }, { "value": "network.continueWithAuth", "ref": "network.ContinueWithAuth" }, { "value": "network.disownData", "ref": "network.DisownData" }, { "value": "network.failRequest", "ref": "network.FailRequest" }, { "value": "network.getData", "ref": "network.GetData" }, { "value": "network.provideResponse", "ref": "network.ProvideResponse" }, { "value": "network.removeDataCollector", "ref": "network.RemoveDataCollector" }, { "value": "network.removeIntercept", "ref": "network.RemoveIntercept" }, { "value": "network.setCacheBehavior", "ref": "network.SetCacheBehavior" }, { "value": "network.setExtraHeaders", "ref": "network.SetExtraHeaders" }, { "value": "script.addPreloadScript", "ref": "script.AddPreloadScript" }, { "value": "script.callFunction", "ref": "script.CallFunction" }, { "value": "script.disown", "ref": "script.Disown" }, { "value": "script.evaluate", "ref": "script.Evaluate" }, { "value": "script.getRealms", "ref": "script.GetRealms" }, { "value": "script.removePreloadScript", "ref": "script.RemovePreloadScript" }, { "value": "session.end", "ref": "session.End" }, { "value": "session.new", "ref": "session.New" }, { "value": "session.status", "ref": "session.Status" }, { "value": "session.subscribe", "ref": "session.Subscribe" }, { "value": "session.unsubscribe", "ref": "session.Unsubscribe" }, { "value": "storage.deleteCookies", "ref": "storage.DeleteCookies" }, { "value": "storage.getCookies", "ref": "storage.GetCookies" }, { "value": "storage.setCookie", "ref": "storage.SetCookie" }, { "value": "webExtension.install", "ref": "webExtension.Install" }, { "value": "webExtension.uninstall", "ref": "webExtension.Uninstall" }] }, { "objectOnly": true });
|
|
40
|
+
const EmptyParams = (0, record_js_1.defineRecord)('EmptyParams', [], { "extensible": true });
|
|
41
|
+
const MessageUnion = (0, union_js_1.defineUnion)('Message', { "by": "type", "variants": [{ "value": "success", "ref": "CommandResponse" }, { "value": "error", "ref": "ErrorResponse" }, { "value": "event", "ref": "Event" }] }, { "objectOnly": true });
|
|
42
|
+
const CommandResponse = (0, record_js_1.defineRecord)('CommandResponse', [{ "name": "type", "wire": "type", "required": true, "type": { "const": "success" } }, { "name": "id", "wire": "id", "required": true, "type": { "ref": "js-uint" } }, { "name": "result", "wire": "result", "required": true, "type": { "ref": "ResultData" } }], { "extensible": true });
|
|
43
|
+
const ErrorResponse = (0, record_js_1.defineRecord)('ErrorResponse', [{ "name": "type", "wire": "type", "required": true, "type": { "const": "error" } }, { "name": "id", "wire": "id", "required": true, "type": { "ref": "js-uint", "nullable": true } }, { "name": "error", "wire": "error", "required": true, "type": { "ref": "ErrorCode" } }, { "name": "message", "wire": "message", "required": true, "type": { "primitive": "string" } }, { "name": "stacktrace", "wire": "stacktrace", "required": false, "type": { "primitive": "string" } }], { "extensible": true });
|
|
44
|
+
const ResultDataUnion = (0, union_js_1.defineUnion)('ResultData', { "correlated": true }, { "objectOnly": true });
|
|
45
|
+
const EmptyResult = (0, record_js_1.defineRecord)('EmptyResult', [], { "extensible": true });
|
|
46
|
+
const Event = (0, record_js_1.defineRecord)('Event', [{ "name": "type", "wire": "type", "required": true, "type": { "const": "event" } }]);
|
|
47
|
+
const EventDataUnion = (0, union_js_1.defineUnion)('EventData', { "by": "method", "variants": [{ "value": "browsingContext.contextCreated", "ref": "browsingContext.ContextCreated" }, { "value": "browsingContext.contextDestroyed", "ref": "browsingContext.ContextDestroyed" }, { "value": "browsingContext.domContentLoaded", "ref": "browsingContext.DomContentLoaded" }, { "value": "browsingContext.downloadEnd", "ref": "browsingContext.DownloadEnd" }, { "value": "browsingContext.downloadWillBegin", "ref": "browsingContext.DownloadWillBegin" }, { "value": "browsingContext.fragmentNavigated", "ref": "browsingContext.FragmentNavigated" }, { "value": "browsingContext.historyUpdated", "ref": "browsingContext.HistoryUpdated" }, { "value": "browsingContext.load", "ref": "browsingContext.Load" }, { "value": "browsingContext.navigationAborted", "ref": "browsingContext.NavigationAborted" }, { "value": "browsingContext.navigationCommitted", "ref": "browsingContext.NavigationCommitted" }, { "value": "browsingContext.navigationFailed", "ref": "browsingContext.NavigationFailed" }, { "value": "browsingContext.navigationStarted", "ref": "browsingContext.NavigationStarted" }, { "value": "browsingContext.userPromptClosed", "ref": "browsingContext.UserPromptClosed" }, { "value": "browsingContext.userPromptOpened", "ref": "browsingContext.UserPromptOpened" }, { "value": "input.fileDialogOpened", "ref": "input.FileDialogOpened" }, { "value": "log.entryAdded", "ref": "log.EntryAdded" }, { "value": "network.authRequired", "ref": "network.AuthRequired" }, { "value": "network.beforeRequestSent", "ref": "network.BeforeRequestSent" }, { "value": "network.fetchError", "ref": "network.FetchError" }, { "value": "network.responseCompleted", "ref": "network.ResponseCompleted" }, { "value": "network.responseStarted", "ref": "network.ResponseStarted" }, { "value": "script.message", "ref": "script.Message" }, { "value": "script.realmCreated", "ref": "script.RealmCreated" }, { "value": "script.realmDestroyed", "ref": "script.RealmDestroyed" }] }, { "objectOnly": true });
|
|
48
|
+
const Extensible = (0, record_js_1.defineRecord)('Extensible', [], { "extensible": true });
|
|
49
|
+
(0, record_js_1.defineAlias)('js-int', { "primitive": "integer" });
|
|
50
|
+
(0, record_js_1.defineAlias)('js-uint', { "primitive": "integer" });
|
|
51
|
+
const ErrorCodeEnum = (0, enum_js_1.defineEnum)('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"]);
|
|
52
|
+
const SessionCommandUnion = (0, union_js_1.defineUnion)('SessionCommand', { "by": "method", "variants": [{ "value": "session.end", "ref": "session.End" }, { "value": "session.new", "ref": "session.New" }, { "value": "session.status", "ref": "session.Status" }, { "value": "session.subscribe", "ref": "session.Subscribe" }, { "value": "session.unsubscribe", "ref": "session.Unsubscribe" }] }, { "objectOnly": true });
|
|
53
|
+
const SessionResultUnion = (0, union_js_1.defineUnion)('SessionResult', { "correlated": true }, { "objectOnly": true });
|
|
54
|
+
const BrowserCommandUnion = (0, union_js_1.defineUnion)('BrowserCommand', { "by": "method", "variants": [{ "value": "browser.close", "ref": "browser.Close" }, { "value": "browser.createUserContext", "ref": "browser.CreateUserContext" }, { "value": "browser.getClientWindows", "ref": "browser.GetClientWindows" }, { "value": "browser.getUserContexts", "ref": "browser.GetUserContexts" }, { "value": "browser.removeUserContext", "ref": "browser.RemoveUserContext" }, { "value": "browser.setClientWindowState", "ref": "browser.SetClientWindowState" }, { "value": "browser.setDownloadBehavior", "ref": "browser.SetDownloadBehavior" }] }, { "objectOnly": true });
|
|
55
|
+
const BrowserResultUnion = (0, union_js_1.defineUnion)('BrowserResult', { "correlated": true }, { "objectOnly": true });
|
|
56
|
+
const BrowsingContextCommandUnion = (0, union_js_1.defineUnion)('BrowsingContextCommand', { "by": "method", "variants": [{ "value": "browsingContext.activate", "ref": "browsingContext.Activate" }, { "value": "browsingContext.captureScreenshot", "ref": "browsingContext.CaptureScreenshot" }, { "value": "browsingContext.close", "ref": "browsingContext.Close" }, { "value": "browsingContext.create", "ref": "browsingContext.Create" }, { "value": "browsingContext.getTree", "ref": "browsingContext.GetTree" }, { "value": "browsingContext.handleUserPrompt", "ref": "browsingContext.HandleUserPrompt" }, { "value": "browsingContext.locateNodes", "ref": "browsingContext.LocateNodes" }, { "value": "browsingContext.navigate", "ref": "browsingContext.Navigate" }, { "value": "browsingContext.print", "ref": "browsingContext.Print" }, { "value": "browsingContext.reload", "ref": "browsingContext.Reload" }, { "value": "browsingContext.setBypassCSP", "ref": "browsingContext.SetBypassCSP" }, { "value": "browsingContext.setViewport", "ref": "browsingContext.SetViewport" }, { "value": "browsingContext.startScreencast", "ref": "browsingContext.StartScreencast" }, { "value": "browsingContext.stopScreencast", "ref": "browsingContext.StopScreencast" }, { "value": "browsingContext.traverseHistory", "ref": "browsingContext.TraverseHistory" }] }, { "objectOnly": true });
|
|
57
|
+
const BrowsingContextResultUnion = (0, union_js_1.defineUnion)('BrowsingContextResult', { "correlated": true }, { "objectOnly": true });
|
|
58
|
+
const BrowsingContextEventUnion = (0, union_js_1.defineUnion)('BrowsingContextEvent', { "by": "method", "variants": [{ "value": "browsingContext.contextCreated", "ref": "browsingContext.ContextCreated" }, { "value": "browsingContext.contextDestroyed", "ref": "browsingContext.ContextDestroyed" }, { "value": "browsingContext.domContentLoaded", "ref": "browsingContext.DomContentLoaded" }, { "value": "browsingContext.downloadEnd", "ref": "browsingContext.DownloadEnd" }, { "value": "browsingContext.downloadWillBegin", "ref": "browsingContext.DownloadWillBegin" }, { "value": "browsingContext.fragmentNavigated", "ref": "browsingContext.FragmentNavigated" }, { "value": "browsingContext.historyUpdated", "ref": "browsingContext.HistoryUpdated" }, { "value": "browsingContext.load", "ref": "browsingContext.Load" }, { "value": "browsingContext.navigationAborted", "ref": "browsingContext.NavigationAborted" }, { "value": "browsingContext.navigationCommitted", "ref": "browsingContext.NavigationCommitted" }, { "value": "browsingContext.navigationFailed", "ref": "browsingContext.NavigationFailed" }, { "value": "browsingContext.navigationStarted", "ref": "browsingContext.NavigationStarted" }, { "value": "browsingContext.userPromptClosed", "ref": "browsingContext.UserPromptClosed" }, { "value": "browsingContext.userPromptOpened", "ref": "browsingContext.UserPromptOpened" }] }, { "objectOnly": true });
|
|
59
|
+
const EmulationCommandUnion = (0, union_js_1.defineUnion)('EmulationCommand', { "by": "method", "variants": [{ "value": "emulation.setForcedColorsModeThemeOverride", "ref": "emulation.SetForcedColorsModeThemeOverride" }, { "value": "emulation.setGeolocationOverride", "ref": "emulation.SetGeolocationOverride" }, { "value": "emulation.setLocaleOverride", "ref": "emulation.SetLocaleOverride" }, { "value": "emulation.setMediaFeaturesOverride", "ref": "emulation.SetMediaFeaturesOverride" }, { "value": "emulation.setNetworkConditions", "ref": "emulation.SetNetworkConditions" }, { "value": "emulation.setScreenOrientationOverride", "ref": "emulation.SetScreenOrientationOverride" }, { "value": "emulation.setScreenSettingsOverride", "ref": "emulation.SetScreenSettingsOverride" }, { "value": "emulation.setScriptingEnabled", "ref": "emulation.SetScriptingEnabled" }, { "value": "emulation.setScrollbarTypeOverride", "ref": "emulation.SetScrollbarTypeOverride" }, { "value": "emulation.setTextLayoutModeOverride", "ref": "emulation.SetTextLayoutModeOverride" }, { "value": "emulation.setTimezoneOverride", "ref": "emulation.SetTimezoneOverride" }, { "value": "emulation.setTouchOverride", "ref": "emulation.SetTouchOverride" }, { "value": "emulation.setUserAgentOverride", "ref": "emulation.SetUserAgentOverride" }, { "value": "emulation.setViewportMetaOverride", "ref": "emulation.SetViewportMetaOverride" }] }, { "objectOnly": true });
|
|
60
|
+
const EmulationResultUnion = (0, union_js_1.defineUnion)('EmulationResult', { "correlated": true }, { "objectOnly": true });
|
|
61
|
+
const NetworkCommandUnion = (0, union_js_1.defineUnion)('NetworkCommand', { "by": "method", "variants": [{ "value": "network.addDataCollector", "ref": "network.AddDataCollector" }, { "value": "network.addIntercept", "ref": "network.AddIntercept" }, { "value": "network.continueRequest", "ref": "network.ContinueRequest" }, { "value": "network.continueResponse", "ref": "network.ContinueResponse" }, { "value": "network.continueWithAuth", "ref": "network.ContinueWithAuth" }, { "value": "network.disownData", "ref": "network.DisownData" }, { "value": "network.failRequest", "ref": "network.FailRequest" }, { "value": "network.getData", "ref": "network.GetData" }, { "value": "network.provideResponse", "ref": "network.ProvideResponse" }, { "value": "network.removeDataCollector", "ref": "network.RemoveDataCollector" }, { "value": "network.removeIntercept", "ref": "network.RemoveIntercept" }, { "value": "network.setCacheBehavior", "ref": "network.SetCacheBehavior" }, { "value": "network.setExtraHeaders", "ref": "network.SetExtraHeaders" }] }, { "objectOnly": true });
|
|
62
|
+
const NetworkResultUnion = (0, union_js_1.defineUnion)('NetworkResult', { "correlated": true }, { "objectOnly": true });
|
|
63
|
+
const NetworkEventUnion = (0, union_js_1.defineUnion)('NetworkEvent', { "by": "method", "variants": [{ "value": "network.authRequired", "ref": "network.AuthRequired" }, { "value": "network.beforeRequestSent", "ref": "network.BeforeRequestSent" }, { "value": "network.fetchError", "ref": "network.FetchError" }, { "value": "network.responseCompleted", "ref": "network.ResponseCompleted" }, { "value": "network.responseStarted", "ref": "network.ResponseStarted" }] }, { "objectOnly": true });
|
|
64
|
+
const ScriptCommandUnion = (0, union_js_1.defineUnion)('ScriptCommand', { "by": "method", "variants": [{ "value": "script.addPreloadScript", "ref": "script.AddPreloadScript" }, { "value": "script.callFunction", "ref": "script.CallFunction" }, { "value": "script.disown", "ref": "script.Disown" }, { "value": "script.evaluate", "ref": "script.Evaluate" }, { "value": "script.getRealms", "ref": "script.GetRealms" }, { "value": "script.removePreloadScript", "ref": "script.RemovePreloadScript" }] }, { "objectOnly": true });
|
|
65
|
+
const ScriptResultUnion = (0, union_js_1.defineUnion)('ScriptResult', { "correlated": true }, { "objectOnly": true });
|
|
66
|
+
const ScriptEventUnion = (0, union_js_1.defineUnion)('ScriptEvent', { "by": "method", "variants": [{ "value": "script.message", "ref": "script.Message" }, { "value": "script.realmCreated", "ref": "script.RealmCreated" }, { "value": "script.realmDestroyed", "ref": "script.RealmDestroyed" }] }, { "objectOnly": true });
|
|
67
|
+
const StorageCommandUnion = (0, union_js_1.defineUnion)('StorageCommand', { "by": "method", "variants": [{ "value": "storage.deleteCookies", "ref": "storage.DeleteCookies" }, { "value": "storage.getCookies", "ref": "storage.GetCookies" }, { "value": "storage.setCookie", "ref": "storage.SetCookie" }] }, { "objectOnly": true });
|
|
68
|
+
const StorageResultUnion = (0, union_js_1.defineUnion)('StorageResult', { "correlated": true }, { "objectOnly": true });
|
|
69
|
+
(0, record_js_1.defineAlias)('LogEvent', { "ref": "log.EntryAdded" });
|
|
70
|
+
const InputCommandUnion = (0, union_js_1.defineUnion)('InputCommand', { "by": "method", "variants": [{ "value": "input.performActions", "ref": "input.PerformActions" }, { "value": "input.releaseActions", "ref": "input.ReleaseActions" }, { "value": "input.setFiles", "ref": "input.SetFiles" }] }, { "objectOnly": true });
|
|
71
|
+
const InputResultUnion = (0, union_js_1.defineUnion)('InputResult', { "correlated": true }, { "objectOnly": true });
|
|
72
|
+
(0, record_js_1.defineAlias)('InputEvent', { "ref": "input.FileDialogOpened" });
|
|
73
|
+
const WebExtensionCommandUnion = (0, union_js_1.defineUnion)('WebExtensionCommand', { "by": "method", "variants": [{ "value": "webExtension.install", "ref": "webExtension.Install" }, { "value": "webExtension.uninstall", "ref": "webExtension.Uninstall" }] }, { "objectOnly": true });
|
|
74
|
+
const WebExtensionResultUnion = (0, union_js_1.defineUnion)('WebExtensionResult', { "correlated": true }, { "objectOnly": true });
|
|
75
|
+
(0, record_js_1.defineAlias)('PermissionsCommand', { "ref": "permissions.setPermission" });
|
|
76
|
+
(0, record_js_1.defineAlias)('SpeculationEvent', { "ref": "speculation.PrefetchStatusUpdated" });
|
|
77
|
+
(0, record_js_1.defineAlias)('UserAgentClientHintsCommand', { "ref": "userAgentClientHints.SetClientHintsOverrideCommand" });
|
|
78
|
+
const BluetoothCommandUnion = (0, union_js_1.defineUnion)('BluetoothCommand', { "by": "method", "variants": [{ "value": "bluetooth.handleRequestDevicePrompt", "ref": "bluetooth.HandleRequestDevicePrompt" }, { "value": "bluetooth.simulateAdapter", "ref": "bluetooth.SimulateAdapter" }, { "value": "bluetooth.disableSimulation", "ref": "bluetooth.DisableSimulation" }, { "value": "bluetooth.simulatePreconnectedPeripheral", "ref": "bluetooth.SimulatePreconnectedPeripheral" }, { "value": "bluetooth.simulateAdvertisement", "ref": "bluetooth.SimulateAdvertisement" }, { "value": "bluetooth.simulateGattConnectionResponse", "ref": "bluetooth.SimulateGattConnectionResponse" }, { "value": "bluetooth.simulateGattDisconnection", "ref": "bluetooth.SimulateGattDisconnection" }, { "value": "bluetooth.simulateService", "ref": "bluetooth.SimulateService" }, { "value": "bluetooth.simulateCharacteristic", "ref": "bluetooth.SimulateCharacteristic" }, { "value": "bluetooth.simulateCharacteristicResponse", "ref": "bluetooth.SimulateCharacteristicResponse" }, { "value": "bluetooth.simulateDescriptor", "ref": "bluetooth.SimulateDescriptor" }, { "value": "bluetooth.simulateDescriptorResponse", "ref": "bluetooth.SimulateDescriptorResponse" }] }, { "objectOnly": true });
|
|
79
|
+
(0, record_js_1.defineAlias)('DigitalCredentialsCommand', { "ref": "digitalCredentials.SetVirtualWalletBehavior" });
|
|
80
|
+
const BluetoothEventUnion = (0, union_js_1.defineUnion)('BluetoothEvent', { "by": "method", "variants": [{ "value": "bluetooth.requestDevicePromptUpdated", "ref": "bluetooth.RequestDevicePromptUpdated" }, { "value": "bluetooth.gattConnectionAttempted", "ref": "bluetooth.GattConnectionAttempted" }, { "value": "bluetooth.characteristicEventGenerated", "ref": "bluetooth.CharacteristicEventGenerated" }, { "value": "bluetooth.descriptorEventGenerated", "ref": "bluetooth.DescriptorEventGenerated" }] }, { "objectOnly": true });
|
|
81
|
+
// --- Enum constants ---
|
|
82
|
+
exports.ErrorCode = Object.freeze({ INVALID_ARGUMENT: "invalid argument", INVALID_SELECTOR: "invalid selector", INVALID_SESSION_ID: "invalid session id", INVALID_WEB_EXTENSION: "invalid web extension", MOVE_TARGET_OUT_OF_BOUNDS: "move target out of bounds", NO_SUCH_ALERT: "no such alert", NO_SUCH_NETWORK_COLLECTOR: "no such network collector", NO_SUCH_ELEMENT: "no such element", NO_SUCH_FRAME: "no such frame", NO_SUCH_HANDLE: "no such handle", NO_SUCH_HISTORY_ENTRY: "no such history entry", NO_SUCH_INTERCEPT: "no such intercept", NO_SUCH_NETWORK_DATA: "no such network data", NO_SUCH_NODE: "no such node", NO_SUCH_REQUEST: "no such request", NO_SUCH_SCREENCAST: "no such screencast", NO_SUCH_SCRIPT: "no such script", NO_SUCH_STORAGE_PARTITION: "no such storage partition", NO_SUCH_USER_CONTEXT: "no such user context", NO_SUCH_WEB_EXTENSION: "no such web extension", SESSION_NOT_CREATED: "session not created", UNABLE_TO_CAPTURE_SCREEN: "unable to capture screen", UNABLE_TO_CLOSE_BROWSER: "unable to close browser", UNABLE_TO_SET_COOKIE: "unable to set cookie", UNABLE_TO_SET_FILE_INPUT: "unable to set file input", UNAVAILABLE_NETWORK_DATA: "unavailable network data", UNDERSPECIFIED_STORAGE_PARTITION: "underspecified storage partition", UNKNOWN_COMMAND: "unknown command", UNKNOWN_ERROR: "unknown error", UNSUPPORTED_OPERATION: "unsupported operation" });
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { EmptyResult } from './common.js';
|
|
2
|
+
import './common.js';
|
|
3
|
+
import { Domain } from '../domain.js';
|
|
4
|
+
export type DigitalCredentialsVirtualWalletAction = "decline" | "respond" | "wait" | "clear";
|
|
5
|
+
export interface DigitalCredentialsSetVirtualWalletBehaviorParameters {
|
|
6
|
+
action: DigitalCredentialsVirtualWalletAction;
|
|
7
|
+
context?: string;
|
|
8
|
+
protocol?: string;
|
|
9
|
+
response?: DigitalCredentialsSetVirtualWalletBehaviorParametersResponse;
|
|
10
|
+
}
|
|
11
|
+
export interface DigitalCredentialsSetVirtualWalletBehavior {
|
|
12
|
+
method: "digitalCredentials.setVirtualWalletBehavior";
|
|
13
|
+
params: DigitalCredentialsSetVirtualWalletBehaviorParameters;
|
|
14
|
+
}
|
|
15
|
+
export type DigitalCredentialsSetVirtualWalletBehaviorResult = EmptyResult;
|
|
16
|
+
export interface DigitalCredentialsSetVirtualWalletBehaviorParametersResponse {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* This is an unsupported API. No compatibility guarantees are provided.
|
|
20
|
+
* It tracks the W3C WebDriver BiDi specification directly. As the specification
|
|
21
|
+
* evolves, this API will change or be removed without prior notice.
|
|
22
|
+
*/
|
|
23
|
+
export declare class DigitalCredentials extends Domain {
|
|
24
|
+
static readonly VirtualWalletAction: Readonly<{
|
|
25
|
+
readonly DECLINE: "decline";
|
|
26
|
+
readonly RESPOND: "respond";
|
|
27
|
+
readonly WAIT: "wait";
|
|
28
|
+
readonly CLEAR: "clear";
|
|
29
|
+
}>;
|
|
30
|
+
static create(driver: unknown): Promise<DigitalCredentials>;
|
|
31
|
+
/**
|
|
32
|
+
* @param {DigitalCredentialsSetVirtualWalletBehaviorParameters} params
|
|
33
|
+
* @param {DigitalCredentialsVirtualWalletAction} params.action
|
|
34
|
+
* @param {string} [params.context]
|
|
35
|
+
* @param {string} [params.protocol]
|
|
36
|
+
* @param {DigitalCredentialsSetVirtualWalletBehaviorParametersResponse} [params.response]
|
|
37
|
+
* @returns {Promise<void>}
|
|
38
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-digitalCredentials-setVirtualWalletBehavior
|
|
39
|
+
*/
|
|
40
|
+
setVirtualWalletBehavior(params: DigitalCredentialsSetVirtualWalletBehaviorParameters): Promise<void>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Licensed to the Software Freedom Conservancy (SFC) under one
|
|
3
|
+
// or more contributor license agreements. See the NOTICE file
|
|
4
|
+
// distributed with this work for additional information
|
|
5
|
+
// regarding copyright ownership. The SFC licenses this file
|
|
6
|
+
// to you under the Apache License, Version 2.0 (the
|
|
7
|
+
// "License"); you may not use this file except in compliance
|
|
8
|
+
// with the License. You may obtain a copy of the License at
|
|
9
|
+
//
|
|
10
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
//
|
|
12
|
+
// Unless required by applicable law or agreed to in writing,
|
|
13
|
+
// software distributed under the License is distributed on an
|
|
14
|
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
// KIND, either express or implied. See the License for the
|
|
16
|
+
// specific language governing permissions and limitations
|
|
17
|
+
// under the License.
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.DigitalCredentials = void 0;
|
|
20
|
+
require("./common.js");
|
|
21
|
+
const record_js_1 = require("../serialization/record.js");
|
|
22
|
+
const enum_js_1 = require("../serialization/enum.js");
|
|
23
|
+
const domain_js_1 = require("../domain.js");
|
|
24
|
+
const DigitalCredentialsVirtualWalletActionEnum = (0, enum_js_1.defineEnum)('digitalCredentials.VirtualWalletAction', ["decline", "respond", "wait", "clear"]);
|
|
25
|
+
const DigitalCredentialsSetVirtualWalletBehaviorParameters = (0, record_js_1.defineRecord)('digitalCredentials.SetVirtualWalletBehaviorParameters', [{ "name": "action", "wire": "action", "required": true, "type": { "ref": "digitalCredentials.VirtualWalletAction" } }, { "name": "context", "wire": "context", "required": false, "type": { "primitive": "string" } }, { "name": "protocol", "wire": "protocol", "required": false, "type": { "primitive": "string" } }, { "name": "response", "wire": "response", "required": false, "type": { "ref": "digitalCredentials.SetVirtualWalletBehaviorParametersResponse" } }]);
|
|
26
|
+
const DigitalCredentialsSetVirtualWalletBehavior = (0, record_js_1.defineRecord)('digitalCredentials.SetVirtualWalletBehavior', [{ "name": "method", "wire": "method", "required": true, "type": { "const": "digitalCredentials.setVirtualWalletBehavior" } }, { "name": "params", "wire": "params", "required": true, "type": { "ref": "digitalCredentials.SetVirtualWalletBehaviorParameters" } }]);
|
|
27
|
+
(0, record_js_1.defineAlias)('digitalCredentials.SetVirtualWalletBehaviorResult', { "ref": "EmptyResult" });
|
|
28
|
+
const DigitalCredentialsSetVirtualWalletBehaviorParametersResponse = (0, record_js_1.defineRecord)('digitalCredentials.SetVirtualWalletBehaviorParametersResponse', [], { "extensible": true });
|
|
29
|
+
// --- Implementation ---
|
|
30
|
+
/**
|
|
31
|
+
* This is an unsupported API. No compatibility guarantees are provided.
|
|
32
|
+
* It tracks the W3C WebDriver BiDi specification directly. As the specification
|
|
33
|
+
* evolves, this API will change or be removed without prior notice.
|
|
34
|
+
*/
|
|
35
|
+
class DigitalCredentials extends domain_js_1.Domain {
|
|
36
|
+
static async create(driver) {
|
|
37
|
+
return new DigitalCredentials(await domain_js_1.Domain.connect(driver), domain_js_1.DOMAIN_TOKEN);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @param {DigitalCredentialsSetVirtualWalletBehaviorParameters} params
|
|
41
|
+
* @param {DigitalCredentialsVirtualWalletAction} params.action
|
|
42
|
+
* @param {string} [params.context]
|
|
43
|
+
* @param {string} [params.protocol]
|
|
44
|
+
* @param {DigitalCredentialsSetVirtualWalletBehaviorParametersResponse} [params.response]
|
|
45
|
+
* @returns {Promise<void>}
|
|
46
|
+
* @see https://w3c.github.io/webdriver-bidi/#command-digitalCredentials-setVirtualWalletBehavior
|
|
47
|
+
*/
|
|
48
|
+
async setVirtualWalletBehavior(params) {
|
|
49
|
+
const validatedParams = new DigitalCredentialsSetVirtualWalletBehaviorParameters(params);
|
|
50
|
+
await this.send('digitalCredentials.setVirtualWalletBehavior', validatedParams);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.DigitalCredentials = DigitalCredentials;
|
|
54
|
+
DigitalCredentials.VirtualWalletAction = Object.freeze({ DECLINE: "decline", RESPOND: "respond", WAIT: "wait", CLEAR: "clear" });
|