UNPKG

selenium-webdriver

Version:

The official WebDriver JavaScript bindings from the Selenium project

83 lines (82 loc) • 25.1 kB
"use strict"; // Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. Object.defineProperty(exports, "__esModule", { value: true }); exports.ErrorCode = void 0; require("./bluetooth.js"); require("./browser.js"); require("./browsing_context.js"); require("./digital_credentials.js"); require("./emulation.js"); require("./input.js"); require("./log.js"); require("./network.js"); require("./permissions.js"); require("./script.js"); require("./session.js"); require("./speculation.js"); require("./storage.js"); require("./user_agent_client_hints.js"); require("./webextension.js"); const record_js_1 = require("../serialization/record.js"); const enum_js_1 = require("../serialization/enum.js"); const union_js_1 = require("../serialization/union.js"); const Command = (0, record_js_1.defineRecord)('Command', [{ "name": "id", "wire": "id", "required": true, "type": { "ref": "js-uint" } }]); 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 }); const EmptyParams = (0, record_js_1.defineRecord)('EmptyParams', [], { "extensible": true }); 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 }); 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 }); 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 }); const ResultDataUnion = (0, union_js_1.defineUnion)('ResultData', { "correlated": true }, { "objectOnly": true }); const EmptyResult = (0, record_js_1.defineRecord)('EmptyResult', [], { "extensible": true }); const Event = (0, record_js_1.defineRecord)('Event', [{ "name": "type", "wire": "type", "required": true, "type": { "const": "event" } }]); 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 }); const Extensible = (0, record_js_1.defineRecord)('Extensible', [], { "extensible": true }); (0, record_js_1.defineAlias)('js-int', { "primitive": "integer" }); (0, record_js_1.defineAlias)('js-uint', { "primitive": "integer" }); 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"]); 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 }); const SessionResultUnion = (0, union_js_1.defineUnion)('SessionResult', { "correlated": true }, { "objectOnly": true }); 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 }); const BrowserResultUnion = (0, union_js_1.defineUnion)('BrowserResult', { "correlated": true }, { "objectOnly": true }); 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 }); const BrowsingContextResultUnion = (0, union_js_1.defineUnion)('BrowsingContextResult', { "correlated": true }, { "objectOnly": true }); 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 }); 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 }); const EmulationResultUnion = (0, union_js_1.defineUnion)('EmulationResult', { "correlated": true }, { "objectOnly": true }); 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 }); const NetworkResultUnion = (0, union_js_1.defineUnion)('NetworkResult', { "correlated": true }, { "objectOnly": true }); 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 }); 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 }); const ScriptResultUnion = (0, union_js_1.defineUnion)('ScriptResult', { "correlated": true }, { "objectOnly": true }); 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 }); 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 }); const StorageResultUnion = (0, union_js_1.defineUnion)('StorageResult', { "correlated": true }, { "objectOnly": true }); (0, record_js_1.defineAlias)('LogEvent', { "ref": "log.EntryAdded" }); 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 }); const InputResultUnion = (0, union_js_1.defineUnion)('InputResult', { "correlated": true }, { "objectOnly": true }); (0, record_js_1.defineAlias)('InputEvent', { "ref": "input.FileDialogOpened" }); 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 }); const WebExtensionResultUnion = (0, union_js_1.defineUnion)('WebExtensionResult', { "correlated": true }, { "objectOnly": true }); (0, record_js_1.defineAlias)('PermissionsCommand', { "ref": "permissions.setPermission" }); (0, record_js_1.defineAlias)('SpeculationEvent', { "ref": "speculation.PrefetchStatusUpdated" }); (0, record_js_1.defineAlias)('UserAgentClientHintsCommand', { "ref": "userAgentClientHints.SetClientHintsOverrideCommand" }); 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 }); (0, record_js_1.defineAlias)('DigitalCredentialsCommand', { "ref": "digitalCredentials.SetVirtualWalletBehavior" }); 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 }); // --- Enum constants --- 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" });