UNPKG

webdriverio-automation

Version:

WebdriverIO-Automation android ios project

1,100 lines (1,099 loc) 162 kB
{ "version": { "major": "1", "minor": "3" }, "domains": [ { "domain": "Console", "description": "This domain is deprecated - use Runtime or Log instead.", "deprecated": true, "dependencies": [ "Runtime" ], "types": [ { "id": "ConsoleMessage", "description": "Console message.", "type": "object", "properties": [ { "name": "source", "description": "Message source.", "type": "string", "enum": [ "xml", "javascript", "network", "console-api", "storage", "appcache", "rendering", "security", "other", "deprecation", "worker" ] }, { "name": "level", "description": "Message severity.", "type": "string", "enum": [ "log", "warning", "error", "debug", "info" ] }, { "name": "text", "description": "Message text.", "type": "string" }, { "name": "url", "description": "URL of the message origin.", "optional": true, "type": "string" }, { "name": "line", "description": "Line number in the resource that generated this message (1-based).", "optional": true, "type": "integer" }, { "name": "column", "description": "Column number in the resource that generated this message (1-based).", "optional": true, "type": "integer" } ] } ], "commands": [ { "name": "clearMessages", "description": "Does nothing." }, { "name": "disable", "description": "Disables console domain, prevents further console messages from being reported to the client." }, { "name": "enable", "description": "Enables console domain, sends the messages collected so far to the client by means of the\n`messageAdded` notification." } ], "events": [ { "name": "messageAdded", "description": "Issued when new console message is added.", "parameters": [ { "name": "message", "description": "Console message that has been added.", "$ref": "ConsoleMessage" } ] } ] }, { "domain": "Debugger", "description": "Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing\nbreakpoints, stepping through execution, exploring stack traces, etc.", "dependencies": [ "Runtime" ], "types": [ { "id": "BreakpointId", "description": "Breakpoint identifier.", "type": "string" }, { "id": "CallFrameId", "description": "Call frame identifier.", "type": "string" }, { "id": "Location", "description": "Location in the source code.", "type": "object", "properties": [ { "name": "scriptId", "description": "Script identifier as reported in the `Debugger.scriptParsed`.", "$ref": "Runtime.ScriptId" }, { "name": "lineNumber", "description": "Line number in the script (0-based).", "type": "integer" }, { "name": "columnNumber", "description": "Column number in the script (0-based).", "optional": true, "type": "integer" } ] }, { "id": "ScriptPosition", "description": "Location in the source code.", "experimental": true, "type": "object", "properties": [ { "name": "lineNumber", "type": "integer" }, { "name": "columnNumber", "type": "integer" } ] }, { "id": "LocationRange", "description": "Location range within one script.", "experimental": true, "type": "object", "properties": [ { "name": "scriptId", "$ref": "Runtime.ScriptId" }, { "name": "start", "$ref": "ScriptPosition" }, { "name": "end", "$ref": "ScriptPosition" } ] }, { "id": "CallFrame", "description": "JavaScript call frame. Array of call frames form the call stack.", "type": "object", "properties": [ { "name": "callFrameId", "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused.", "$ref": "CallFrameId" }, { "name": "functionName", "description": "Name of the JavaScript function called on this call frame.", "type": "string" }, { "name": "functionLocation", "description": "Location in the source code.", "optional": true, "$ref": "Location" }, { "name": "location", "description": "Location in the source code.", "$ref": "Location" }, { "name": "url", "description": "JavaScript script name or url.", "type": "string" }, { "name": "scopeChain", "description": "Scope chain for this call frame.", "type": "array", "items": { "$ref": "Scope" } }, { "name": "this", "description": "`this` object for this call frame.", "$ref": "Runtime.RemoteObject" }, { "name": "returnValue", "description": "The value being returned, if the function is at return point.", "optional": true, "$ref": "Runtime.RemoteObject" } ] }, { "id": "Scope", "description": "Scope description.", "type": "object", "properties": [ { "name": "type", "description": "Scope type.", "type": "string", "enum": [ "global", "local", "with", "closure", "catch", "block", "script", "eval", "module", "wasm-expression-stack" ] }, { "name": "object", "description": "Object representing the scope. For `global` and `with` scopes it represents the actual\nobject; for the rest of the scopes, it is artificial transient object enumerating scope\nvariables as its properties.", "$ref": "Runtime.RemoteObject" }, { "name": "name", "optional": true, "type": "string" }, { "name": "startLocation", "description": "Location in the source code where scope starts", "optional": true, "$ref": "Location" }, { "name": "endLocation", "description": "Location in the source code where scope ends", "optional": true, "$ref": "Location" } ] }, { "id": "SearchMatch", "description": "Search match for resource.", "type": "object", "properties": [ { "name": "lineNumber", "description": "Line number in resource content.", "type": "number" }, { "name": "lineContent", "description": "Line with match content.", "type": "string" } ] }, { "id": "BreakLocation", "type": "object", "properties": [ { "name": "scriptId", "description": "Script identifier as reported in the `Debugger.scriptParsed`.", "$ref": "Runtime.ScriptId" }, { "name": "lineNumber", "description": "Line number in the script (0-based).", "type": "integer" }, { "name": "columnNumber", "description": "Column number in the script (0-based).", "optional": true, "type": "integer" }, { "name": "type", "optional": true, "type": "string", "enum": [ "debuggerStatement", "call", "return" ] } ] }, { "id": "ScriptLanguage", "description": "Enum of possible script languages.", "type": "string", "enum": [ "JavaScript", "WebAssembly" ] }, { "id": "DebugSymbols", "description": "Debug symbols available for a wasm script.", "type": "object", "properties": [ { "name": "type", "description": "Type of the debug symbols.", "type": "string", "enum": [ "None", "SourceMap", "EmbeddedDWARF", "ExternalDWARF" ] }, { "name": "externalURL", "description": "URL of the external symbol source.", "optional": true, "type": "string" } ] } ], "commands": [ { "name": "continueToLocation", "description": "Continues execution until specific location is reached.", "parameters": [ { "name": "location", "description": "Location to continue to.", "$ref": "Location" }, { "name": "targetCallFrames", "optional": true, "type": "string", "enum": [ "any", "current" ] } ] }, { "name": "disable", "description": "Disables debugger for given page." }, { "name": "enable", "description": "Enables debugger for the given page. Clients should not assume that the debugging has been\nenabled until the result for this command is received.", "parameters": [ { "name": "maxScriptsCacheSize", "description": "The maximum size in bytes of collected scripts (not referenced by other heap objects)\nthe debugger can hold. Puts no limit if paramter is omitted.", "experimental": true, "optional": true, "type": "number" } ], "returns": [ { "name": "debuggerId", "description": "Unique identifier of the debugger.", "experimental": true, "$ref": "Runtime.UniqueDebuggerId" } ] }, { "name": "evaluateOnCallFrame", "description": "Evaluates expression on a given call frame.", "parameters": [ { "name": "callFrameId", "description": "Call frame identifier to evaluate on.", "$ref": "CallFrameId" }, { "name": "expression", "description": "Expression to evaluate.", "type": "string" }, { "name": "objectGroup", "description": "String object group name to put result into (allows rapid releasing resulting object handles\nusing `releaseObjectGroup`).", "optional": true, "type": "string" }, { "name": "includeCommandLineAPI", "description": "Specifies whether command line API should be available to the evaluated expression, defaults\nto false.", "optional": true, "type": "boolean" }, { "name": "silent", "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause\nexecution. Overrides `setPauseOnException` state.", "optional": true, "type": "boolean" }, { "name": "returnByValue", "description": "Whether the result is expected to be a JSON object that should be sent by value.", "optional": true, "type": "boolean" }, { "name": "generatePreview", "description": "Whether preview should be generated for the result.", "experimental": true, "optional": true, "type": "boolean" }, { "name": "throwOnSideEffect", "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation.", "optional": true, "type": "boolean" }, { "name": "timeout", "description": "Terminate execution after timing out (number of milliseconds).", "experimental": true, "optional": true, "$ref": "Runtime.TimeDelta" } ], "returns": [ { "name": "result", "description": "Object wrapper for the evaluation result.", "$ref": "Runtime.RemoteObject" }, { "name": "exceptionDetails", "description": "Exception details.", "optional": true, "$ref": "Runtime.ExceptionDetails" } ] }, { "name": "executeWasmEvaluator", "description": "Execute a Wasm Evaluator module on a given call frame.", "experimental": true, "parameters": [ { "name": "callFrameId", "description": "WebAssembly call frame identifier to evaluate on.", "$ref": "CallFrameId" }, { "name": "evaluator", "description": "Code of the evaluator module.", "type": "string" }, { "name": "timeout", "description": "Terminate execution after timing out (number of milliseconds).", "experimental": true, "optional": true, "$ref": "Runtime.TimeDelta" } ], "returns": [ { "name": "result", "description": "Object wrapper for the evaluation result.", "$ref": "Runtime.RemoteObject" }, { "name": "exceptionDetails", "description": "Exception details.", "optional": true, "$ref": "Runtime.ExceptionDetails" } ] }, { "name": "getPossibleBreakpoints", "description": "Returns possible locations for breakpoint. scriptId in start and end range locations should be\nthe same.", "parameters": [ { "name": "start", "description": "Start of range to search possible breakpoint locations in.", "$ref": "Location" }, { "name": "end", "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end\nof scripts is used as end of range.", "optional": true, "$ref": "Location" }, { "name": "restrictToFunction", "description": "Only consider locations which are in the same (non-nested) function as start.", "optional": true, "type": "boolean" } ], "returns": [ { "name": "locations", "description": "List of the possible breakpoint locations.", "type": "array", "items": { "$ref": "BreakLocation" } } ] }, { "name": "getScriptSource", "description": "Returns source for the script with given id.", "parameters": [ { "name": "scriptId", "description": "Id of the script to get source for.", "$ref": "Runtime.ScriptId" } ], "returns": [ { "name": "scriptSource", "description": "Script source (empty in case of Wasm bytecode).", "type": "string" }, { "name": "bytecode", "description": "Wasm bytecode.", "optional": true, "type": "string" } ] }, { "name": "getWasmBytecode", "description": "This command is deprecated. Use getScriptSource instead.", "deprecated": true, "parameters": [ { "name": "scriptId", "description": "Id of the Wasm script to get source for.", "$ref": "Runtime.ScriptId" } ], "returns": [ { "name": "bytecode", "description": "Script source.", "type": "string" } ] }, { "name": "getStackTrace", "description": "Returns stack trace with given `stackTraceId`.", "experimental": true, "parameters": [ { "name": "stackTraceId", "$ref": "Runtime.StackTraceId" } ], "returns": [ { "name": "stackTrace", "$ref": "Runtime.StackTrace" } ] }, { "name": "pause", "description": "Stops on the next JavaScript statement." }, { "name": "pauseOnAsyncCall", "experimental": true, "deprecated": true, "parameters": [ { "name": "parentStackTraceId", "description": "Debugger will pause when async call with given stack trace is started.", "$ref": "Runtime.StackTraceId" } ] }, { "name": "removeBreakpoint", "description": "Removes JavaScript breakpoint.", "parameters": [ { "name": "breakpointId", "$ref": "BreakpointId" } ] }, { "name": "restartFrame", "description": "Restarts particular call frame from the beginning.", "parameters": [ { "name": "callFrameId", "description": "Call frame identifier to evaluate on.", "$ref": "CallFrameId" } ], "returns": [ { "name": "callFrames", "description": "New stack trace.", "type": "array", "items": { "$ref": "CallFrame" } }, { "name": "asyncStackTrace", "description": "Async stack trace, if any.", "optional": true, "$ref": "Runtime.StackTrace" }, { "name": "asyncStackTraceId", "description": "Async stack trace, if any.", "experimental": true, "optional": true, "$ref": "Runtime.StackTraceId" } ] }, { "name": "resume", "description": "Resumes JavaScript execution.", "parameters": [ { "name": "terminateOnResume", "description": "Set to true to terminate execution upon resuming execution. In contrast\nto Runtime.terminateExecution, this will allows to execute further\nJavaScript (i.e. via evaluation) until execution of the paused code\nis actually resumed, at which point termination is triggered.\nIf execution is currently not paused, this parameter has no effect.", "optional": true, "type": "boolean" } ] }, { "name": "searchInContent", "description": "Searches for given string in script content.", "parameters": [ { "name": "scriptId", "description": "Id of the script to search in.", "$ref": "Runtime.ScriptId" }, { "name": "query", "description": "String to search for.", "type": "string" }, { "name": "caseSensitive", "description": "If true, search is case sensitive.", "optional": true, "type": "boolean" }, { "name": "isRegex", "description": "If true, treats string parameter as regex.", "optional": true, "type": "boolean" } ], "returns": [ { "name": "result", "description": "List of search matches.", "type": "array", "items": { "$ref": "SearchMatch" } } ] }, { "name": "setAsyncCallStackDepth", "description": "Enables or disables async call stacks tracking.", "parameters": [ { "name": "maxDepth", "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async\ncall stacks (default).", "type": "integer" } ] }, { "name": "setBlackboxPatterns", "description": "Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in\nscripts with url matching one of the patterns. VM will try to leave blackboxed script by\nperforming 'step in' several times, finally resorting to 'step out' if unsuccessful.", "experimental": true, "parameters": [ { "name": "patterns", "description": "Array of regexps that will be used to check script url for blackbox state.", "type": "array", "items": { "type": "string" } } ] }, { "name": "setBlackboxedRanges", "description": "Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted\nscripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.\nPositions array contains positions where blackbox state is changed. First interval isn't\nblackboxed. Array should be sorted.", "experimental": true, "parameters": [ { "name": "scriptId", "description": "Id of the script.", "$ref": "Runtime.ScriptId" }, { "name": "positions", "type": "array", "items": { "$ref": "ScriptPosition" } } ] }, { "name": "setBreakpoint", "description": "Sets JavaScript breakpoint at a given location.", "parameters": [ { "name": "location", "description": "Location to set breakpoint in.", "$ref": "Location" }, { "name": "condition", "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the\nbreakpoint if this expression evaluates to true.", "optional": true, "type": "string" } ], "returns": [ { "name": "breakpointId", "description": "Id of the created breakpoint for further reference.", "$ref": "BreakpointId" }, { "name": "actualLocation", "description": "Location this breakpoint resolved into.", "$ref": "Location" } ] }, { "name": "setInstrumentationBreakpoint", "description": "Sets instrumentation breakpoint.", "parameters": [ { "name": "instrumentation", "description": "Instrumentation name.", "type": "string", "enum": [ "beforeScriptExecution", "beforeScriptWithSourceMapExecution" ] } ], "returns": [ { "name": "breakpointId", "description": "Id of the created breakpoint for further reference.", "$ref": "BreakpointId" } ] }, { "name": "setBreakpointByUrl", "description": "Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this\ncommand is issued, all existing parsed scripts will have breakpoints resolved and returned in\n`locations` property. Further matching script parsing will result in subsequent\n`breakpointResolved` events issued. This logical breakpoint will survive page reloads.", "parameters": [ { "name": "lineNumber", "description": "Line number to set breakpoint at.", "type": "integer" }, { "name": "url", "description": "URL of the resources to set breakpoint on.", "optional": true, "type": "string" }, { "name": "urlRegex", "description": "Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or\n`urlRegex` must be specified.", "optional": true, "type": "string" }, { "name": "scriptHash", "description": "Script hash of the resources to set breakpoint on.", "optional": true, "type": "string" }, { "name": "columnNumber", "description": "Offset in the line to set breakpoint at.", "optional": true, "type": "integer" }, { "name": "condition", "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the\nbreakpoint if this expression evaluates to true.", "optional": true, "type": "string" } ], "returns": [ { "name": "breakpointId", "description": "Id of the created breakpoint for further reference.", "$ref": "BreakpointId" }, { "name": "locations", "description": "List of the locations this breakpoint resolved into upon addition.", "type": "array", "items": { "$ref": "Location" } } ] }, { "name": "setBreakpointOnFunctionCall", "description": "Sets JavaScript breakpoint before each call to the given function.\nIf another function was created from the same source as a given one,\ncalling it will also trigger the breakpoint.", "experimental": true, "parameters": [ { "name": "objectId", "description": "Function object id.", "$ref": "Runtime.RemoteObjectId" }, { "name": "condition", "description": "Expression to use as a breakpoint condition. When specified, debugger will\nstop on the breakpoint if this expression evaluates to true.", "optional": true, "type": "string" } ], "returns": [ { "name": "breakpointId", "description": "Id of the created breakpoint for further reference.", "$ref": "BreakpointId" } ] }, { "name": "setBreakpointsActive", "description": "Activates / deactivates all breakpoints on the page.", "parameters": [ { "name": "active", "description": "New value for breakpoints active state.", "type": "boolean" } ] }, { "name": "setPauseOnExceptions", "description": "Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or\nno exceptions. Initial pause on exceptions state is `none`.", "parameters": [ { "name": "state", "description": "Pause on exceptions mode.", "type": "string", "enum": [ "none", "uncaught", "all" ] } ] }, { "name": "setReturnValue", "description": "Changes return value in top frame. Available only at return break position.", "experimental": true, "parameters": [ { "name": "newValue", "description": "New return value.", "$ref": "Runtime.CallArgument" } ] }, { "name": "setScriptSource", "description": "Edits JavaScript source live.", "parameters": [ { "name": "scriptId", "description": "Id of the script to edit.", "$ref": "Runtime.ScriptId" }, { "name": "scriptSource", "description": "New content of the script.", "type": "string" }, { "name": "dryRun", "description": "If true the change will not actually be applied. Dry run may be used to get result\ndescription without actually modifying the code.", "optional": true, "type": "boolean" } ], "returns": [ { "name": "callFrames", "description": "New stack trace in case editing has happened while VM was stopped.", "optional": true, "type": "array", "items": { "$ref": "CallFrame" } }, { "name": "stackChanged", "description": "Whether current call stack was modified after applying the changes.", "optional": true, "type": "boolean" }, { "name": "asyncStackTrace", "description": "Async stack trace, if any.", "optional": true, "$ref": "Runtime.StackTrace" }, { "name": "asyncStackTraceId", "description": "Async stack trace, if any.", "experimental": true, "optional": true, "$ref": "Runtime.StackTraceId" }, { "name": "exceptionDetails", "description": "Exception details if any.", "optional": true, "$ref": "Runtime.ExceptionDetails" } ] }, { "name": "setSkipAllPauses", "description": "Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).", "parameters": [ { "name": "skip", "description": "New value for skip pauses state.", "type": "boolean" } ] }, { "name": "setVariableValue", "description": "Changes value of variable in a callframe. Object-based scopes are not supported and must be\nmutated manually.", "parameters": [ { "name": "scopeNumber", "description": "0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch'\nscope types are allowed. Other scopes could be manipulated manually.", "type": "integer" }, { "name": "variableName", "description": "Variable name.", "type": "string" }, { "name": "newValue", "description": "New variable value.", "$ref": "Runtime.CallArgument" }, { "name": "callFrameId", "description": "Id of callframe that holds variable.", "$ref": "CallFrameId" } ] }, { "name": "stepInto", "description": "Steps into the function call.", "parameters": [ { "name": "breakOnAsyncCall", "description": "Debugger will pause on the execution of the first async task which was scheduled\nbefore next pause.", "experimental": true, "optional": true, "type": "boolean" }, { "name": "skipList", "description": "The skipList specifies location ranges that should be skipped on step into.", "experimental": true, "optional": true, "type": "array", "items": { "$ref": "LocationRange" } } ] }, { "name": "stepOut", "description": "Steps out of the function call." }, { "name": "stepOver", "description": "Steps over the statement.", "parameters": [ { "name": "skipList", "description": "The skipList specifies location ranges that should be skipped on step over.", "experimental": true, "optional": true, "type": "array", "items": { "$ref": "LocationRange" } } ] } ], "events": [ { "name": "breakpointResolved", "description": "Fired when breakpoint is resolved to an actual script and location.", "parameters": [ { "name": "breakpointId", "description": "Breakpoint unique identifier.", "$ref": "BreakpointId" }, { "name": "location", "description": "Actual breakpoint location.", "$ref": "Location" } ] }, { "name": "paused", "description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.", "parameters": [ { "name": "callFrames", "description": "Call stack the virtual machine stopped on.", "type": "array",