webdriverio-automation
Version:
WebdriverIO-Automation android ios project
1,328 lines (1,029 loc) • 133 kB
TypeScript
/**********************************************************************
* Auto-generated by protocol-dts-generator.ts, do not edit manually. *
**********************************************************************/
import Protocol from './protocol'
/**
* API generated from Protocol commands and events.
*/
export namespace ProtocolProxyApi {
export interface ProtocolApi {
Console: ConsoleApi;
Debugger: DebuggerApi;
HeapProfiler: HeapProfilerApi;
Profiler: ProfilerApi;
Runtime: RuntimeApi;
Schema: SchemaApi;
Accessibility: AccessibilityApi;
Animation: AnimationApi;
ApplicationCache: ApplicationCacheApi;
Audits: AuditsApi;
BackgroundService: BackgroundServiceApi;
Browser: BrowserApi;
CSS: CSSApi;
CacheStorage: CacheStorageApi;
Cast: CastApi;
DOM: DOMApi;
DOMDebugger: DOMDebuggerApi;
DOMSnapshot: DOMSnapshotApi;
DOMStorage: DOMStorageApi;
Database: DatabaseApi;
DeviceOrientation: DeviceOrientationApi;
Emulation: EmulationApi;
HeadlessExperimental: HeadlessExperimentalApi;
IO: IOApi;
IndexedDB: IndexedDBApi;
Input: InputApi;
Inspector: InspectorApi;
LayerTree: LayerTreeApi;
Log: LogApi;
Memory: MemoryApi;
Network: NetworkApi;
Overlay: OverlayApi;
Page: PageApi;
Performance: PerformanceApi;
Security: SecurityApi;
ServiceWorker: ServiceWorkerApi;
Storage: StorageApi;
SystemInfo: SystemInfoApi;
Target: TargetApi;
Tethering: TetheringApi;
Tracing: TracingApi;
Fetch: FetchApi;
WebAudio: WebAudioApi;
WebAuthn: WebAuthnApi;
Media: MediaApi;
}
export interface ConsoleApi {
/**
* Does nothing.
*/
clearMessages(): Promise<void>;
/**
* Disables console domain, prevents further console messages from being reported to the client.
*/
disable(): Promise<void>;
/**
* Enables console domain, sends the messages collected so far to the client by means of the
* `messageAdded` notification.
*/
enable(): Promise<void>;
/**
* Issued when new console message is added.
*/
on(event: 'messageAdded', listener: (params: Protocol.Console.MessageAddedEvent) => void): void;
}
export interface DebuggerApi {
/**
* Continues execution until specific location is reached.
*/
continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest): Promise<void>;
/**
* Disables debugger for given page.
*/
disable(): Promise<void>;
/**
* Enables debugger for the given page. Clients should not assume that the debugging has been
* enabled until the result for this command is received.
*/
enable(params: Protocol.Debugger.EnableRequest): Promise<Protocol.Debugger.EnableResponse>;
/**
* Evaluates expression on a given call frame.
*/
evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest): Promise<Protocol.Debugger.EvaluateOnCallFrameResponse>;
/**
* Execute a Wasm Evaluator module on a given call frame.
*/
executeWasmEvaluator(params: Protocol.Debugger.ExecuteWasmEvaluatorRequest): Promise<Protocol.Debugger.ExecuteWasmEvaluatorResponse>;
/**
* Returns possible locations for breakpoint. scriptId in start and end range locations should be
* the same.
*/
getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest): Promise<Protocol.Debugger.GetPossibleBreakpointsResponse>;
/**
* Returns source for the script with given id.
*/
getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest): Promise<Protocol.Debugger.GetScriptSourceResponse>;
/**
* This command is deprecated. Use getScriptSource instead.
*/
getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest): Promise<Protocol.Debugger.GetWasmBytecodeResponse>;
/**
* Returns stack trace with given `stackTraceId`.
*/
getStackTrace(params: Protocol.Debugger.GetStackTraceRequest): Promise<Protocol.Debugger.GetStackTraceResponse>;
/**
* Stops on the next JavaScript statement.
*/
pause(): Promise<void>;
pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest): Promise<void>;
/**
* Removes JavaScript breakpoint.
*/
removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest): Promise<void>;
/**
* Restarts particular call frame from the beginning.
*/
restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<Protocol.Debugger.RestartFrameResponse>;
/**
* Resumes JavaScript execution.
*/
resume(params: Protocol.Debugger.ResumeRequest): Promise<void>;
/**
* Searches for given string in script content.
*/
searchInContent(params: Protocol.Debugger.SearchInContentRequest): Promise<Protocol.Debugger.SearchInContentResponse>;
/**
* Enables or disables async call stacks tracking.
*/
setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise<void>;
/**
* Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in
* scripts with url matching one of the patterns. VM will try to leave blackboxed script by
* performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
*/
setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest): Promise<void>;
/**
* Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted
* scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
* Positions array contains positions where blackbox state is changed. First interval isn't
* blackboxed. Array should be sorted.
*/
setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest): Promise<void>;
/**
* Sets JavaScript breakpoint at a given location.
*/
setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest): Promise<Protocol.Debugger.SetBreakpointResponse>;
/**
* Sets instrumentation breakpoint.
*/
setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest): Promise<Protocol.Debugger.SetInstrumentationBreakpointResponse>;
/**
* Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this
* command is issued, all existing parsed scripts will have breakpoints resolved and returned in
* `locations` property. Further matching script parsing will result in subsequent
* `breakpointResolved` events issued. This logical breakpoint will survive page reloads.
*/
setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest): Promise<Protocol.Debugger.SetBreakpointByUrlResponse>;
/**
* Sets JavaScript breakpoint before each call to the given function.
* If another function was created from the same source as a given one,
* calling it will also trigger the breakpoint.
*/
setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest): Promise<Protocol.Debugger.SetBreakpointOnFunctionCallResponse>;
/**
* Activates / deactivates all breakpoints on the page.
*/
setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest): Promise<void>;
/**
* Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or
* no exceptions. Initial pause on exceptions state is `none`.
*/
setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest): Promise<void>;
/**
* Changes return value in top frame. Available only at return break position.
*/
setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<void>;
/**
* Edits JavaScript source live.
*/
setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest): Promise<Protocol.Debugger.SetScriptSourceResponse>;
/**
* Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
*/
setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest): Promise<void>;
/**
* Changes value of variable in a callframe. Object-based scopes are not supported and must be
* mutated manually.
*/
setVariableValue(params: Protocol.Debugger.SetVariableValueRequest): Promise<void>;
/**
* Steps into the function call.
*/
stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<void>;
/**
* Steps out of the function call.
*/
stepOut(): Promise<void>;
/**
* Steps over the statement.
*/
stepOver(params: Protocol.Debugger.StepOverRequest): Promise<void>;
/**
* Fired when breakpoint is resolved to an actual script and location.
*/
on(event: 'breakpointResolved', listener: (params: Protocol.Debugger.BreakpointResolvedEvent) => void): void;
/**
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
*/
on(event: 'paused', listener: (params: Protocol.Debugger.PausedEvent) => void): void;
/**
* Fired when the virtual machine resumed execution.
*/
on(event: 'resumed', listener: () => void): void;
/**
* Fired when virtual machine fails to parse the script.
*/
on(event: 'scriptFailedToParse', listener: (params: Protocol.Debugger.ScriptFailedToParseEvent) => void): void;
/**
* Fired when virtual machine parses script. This event is also fired for all known and uncollected
* scripts upon enabling debugger.
*/
on(event: 'scriptParsed', listener: (params: Protocol.Debugger.ScriptParsedEvent) => void): void;
}
export interface HeapProfilerApi {
/**
* Enables console to refer to the node with given id via $x (see Command Line API for more details
* $x functions).
*/
addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest): Promise<void>;
collectGarbage(): Promise<void>;
disable(): Promise<void>;
enable(): Promise<void>;
getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetHeapObjectIdResponse>;
getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse>;
getSamplingProfile(): Promise<Protocol.HeapProfiler.GetSamplingProfileResponse>;
startSampling(params: Protocol.HeapProfiler.StartSamplingRequest): Promise<void>;
startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest): Promise<void>;
stopSampling(): Promise<Protocol.HeapProfiler.StopSamplingResponse>;
stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest): Promise<void>;
takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest): Promise<void>;
on(event: 'addHeapSnapshotChunk', listener: (params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent) => void): void;
/**
* If heap objects tracking has been started then backend may send update for one or more fragments
*/
on(event: 'heapStatsUpdate', listener: (params: Protocol.HeapProfiler.HeapStatsUpdateEvent) => void): void;
/**
* If heap objects tracking has been started then backend regularly sends a current value for last
* seen object id and corresponding timestamp. If the were changes in the heap since last event
* then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
*/
on(event: 'lastSeenObjectId', listener: (params: Protocol.HeapProfiler.LastSeenObjectIdEvent) => void): void;
on(event: 'reportHeapSnapshotProgress', listener: (params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent) => void): void;
on(event: 'resetProfiles', listener: () => void): void;
}
export interface ProfilerApi {
disable(): Promise<void>;
enable(): Promise<void>;
/**
* Collect coverage data for the current isolate. The coverage data may be incomplete due to
* garbage collection.
*/
getBestEffortCoverage(): Promise<Protocol.Profiler.GetBestEffortCoverageResponse>;
/**
* Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
*/
setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest): Promise<void>;
start(): Promise<void>;
/**
* Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
* coverage may be incomplete. Enabling prevents running optimized code and resets execution
* counters.
*/
startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest): Promise<Protocol.Profiler.StartPreciseCoverageResponse>;
/**
* Enable type profile.
*/
startTypeProfile(): Promise<void>;
stop(): Promise<Protocol.Profiler.StopResponse>;
/**
* Disable precise code coverage. Disabling releases unnecessary execution count records and allows
* executing optimized code.
*/
stopPreciseCoverage(): Promise<void>;
/**
* Disable type profile. Disabling releases type profile data collected so far.
*/
stopTypeProfile(): Promise<void>;
/**
* Collect coverage data for the current isolate, and resets execution counters. Precise code
* coverage needs to have started.
*/
takePreciseCoverage(): Promise<Protocol.Profiler.TakePreciseCoverageResponse>;
/**
* Collect type profile.
*/
takeTypeProfile(): Promise<Protocol.Profiler.TakeTypeProfileResponse>;
/**
* Enable run time call stats collection.
*/
enableRuntimeCallStats(): Promise<void>;
/**
* Disable run time call stats collection.
*/
disableRuntimeCallStats(): Promise<void>;
/**
* Retrieve run time call stats.
*/
getRuntimeCallStats(): Promise<Protocol.Profiler.GetRuntimeCallStatsResponse>;
on(event: 'consoleProfileFinished', listener: (params: Protocol.Profiler.ConsoleProfileFinishedEvent) => void): void;
/**
* Sent when new profile recording is started using console.profile() call.
*/
on(event: 'consoleProfileStarted', listener: (params: Protocol.Profiler.ConsoleProfileStartedEvent) => void): void;
/**
* Reports coverage delta since the last poll (either from an event like this, or from
* `takePreciseCoverage` for the current isolate. May only be sent if precise code
* coverage has been started. This event can be trigged by the embedder to, for example,
* trigger collection of coverage data immediatelly at a certain point in time.
*/
on(event: 'preciseCoverageDeltaUpdate', listener: (params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent) => void): void;
}
export interface RuntimeApi {
/**
* Add handler to promise with given promise object id.
*/
awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<Protocol.Runtime.AwaitPromiseResponse>;
/**
* Calls function with given declaration on the given object. Object group of the result is
* inherited from the target object.
*/
callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest): Promise<Protocol.Runtime.CallFunctionOnResponse>;
/**
* Compiles expression.
*/
compileScript(params: Protocol.Runtime.CompileScriptRequest): Promise<Protocol.Runtime.CompileScriptResponse>;
/**
* Disables reporting of execution contexts creation.
*/
disable(): Promise<void>;
/**
* Discards collected exceptions and console API calls.
*/
discardConsoleEntries(): Promise<void>;
/**
* Enables reporting of execution contexts creation by means of `executionContextCreated` event.
* When the reporting gets enabled the event will be sent immediately for each existing execution
* context.
*/
enable(): Promise<void>;
/**
* Evaluates expression on global object.
*/
evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<Protocol.Runtime.EvaluateResponse>;
/**
* Returns the isolate id.
*/
getIsolateId(): Promise<Protocol.Runtime.GetIsolateIdResponse>;
/**
* Returns the JavaScript heap usage.
* It is the total usage of the corresponding isolate not scoped to a particular Runtime.
*/
getHeapUsage(): Promise<Protocol.Runtime.GetHeapUsageResponse>;
/**
* Returns properties of a given object. Object group of the result is inherited from the target
* object.
*/
getProperties(params: Protocol.Runtime.GetPropertiesRequest): Promise<Protocol.Runtime.GetPropertiesResponse>;
/**
* Returns all let, const and class variables from global scope.
*/
globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest): Promise<Protocol.Runtime.GlobalLexicalScopeNamesResponse>;
queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<Protocol.Runtime.QueryObjectsResponse>;
/**
* Releases remote object with given id.
*/
releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<void>;
/**
* Releases all remote objects that belong to a given group.
*/
releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest): Promise<void>;
/**
* Tells inspected instance to run if it was waiting for debugger to attach.
*/
runIfWaitingForDebugger(): Promise<void>;
/**
* Runs script with given id in a given context.
*/
runScript(params: Protocol.Runtime.RunScriptRequest): Promise<Protocol.Runtime.RunScriptResponse>;
/**
* Enables or disables async call stacks tracking.
*/
setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest): Promise<void>;
setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest): Promise<void>;
setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest): Promise<void>;
/**
* Terminate current or next JavaScript execution.
* Will cancel the termination when the outer-most script execution ends.
*/
terminateExecution(): Promise<void>;
/**
* If executionContextId is empty, adds binding with the given name on the
* global objects of all inspected contexts, including those created later,
* bindings survive reloads.
* If executionContextId is specified, adds binding only on global object of
* given execution context.
* Binding function takes exactly one argument, this argument should be string,
* in case of any other input, function throws an exception.
* Each binding function call produces Runtime.bindingCalled notification.
*/
addBinding(params: Protocol.Runtime.AddBindingRequest): Promise<void>;
/**
* This method does not remove binding function from global object but
* unsubscribes current runtime agent from Runtime.bindingCalled notifications.
*/
removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<void>;
/**
* Notification is issued every time when binding is called.
*/
on(event: 'bindingCalled', listener: (params: Protocol.Runtime.BindingCalledEvent) => void): void;
/**
* Issued when console API was called.
*/
on(event: 'consoleAPICalled', listener: (params: Protocol.Runtime.ConsoleAPICalledEvent) => void): void;
/**
* Issued when unhandled exception was revoked.
*/
on(event: 'exceptionRevoked', listener: (params: Protocol.Runtime.ExceptionRevokedEvent) => void): void;
/**
* Issued when exception was thrown and unhandled.
*/
on(event: 'exceptionThrown', listener: (params: Protocol.Runtime.ExceptionThrownEvent) => void): void;
/**
* Issued when new execution context is created.
*/
on(event: 'executionContextCreated', listener: (params: Protocol.Runtime.ExecutionContextCreatedEvent) => void): void;
/**
* Issued when execution context is destroyed.
*/
on(event: 'executionContextDestroyed', listener: (params: Protocol.Runtime.ExecutionContextDestroyedEvent) => void): void;
/**
* Issued when all executionContexts were cleared in browser
*/
on(event: 'executionContextsCleared', listener: () => void): void;
/**
* Issued when object should be inspected (for example, as a result of inspect() command line API
* call).
*/
on(event: 'inspectRequested', listener: (params: Protocol.Runtime.InspectRequestedEvent) => void): void;
}
export interface SchemaApi {
/**
* Returns supported domains.
*/
getDomains(): Promise<Protocol.Schema.GetDomainsResponse>;
}
export interface AccessibilityApi {
/**
* Disables the accessibility domain.
*/
disable(): Promise<void>;
/**
* Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.
* This turns on accessibility for the page, which can impact performance until accessibility is disabled.
*/
enable(): Promise<void>;
/**
* Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
*/
getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise<Protocol.Accessibility.GetPartialAXTreeResponse>;
/**
* Fetches the entire accessibility tree
*/
getFullAXTree(): Promise<Protocol.Accessibility.GetFullAXTreeResponse>;
}
export interface AnimationApi {
/**
* Disables animation domain notifications.
*/
disable(): Promise<void>;
/**
* Enables animation domain notifications.
*/
enable(): Promise<void>;
/**
* Returns the current time of the an animation.
*/
getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise<Protocol.Animation.GetCurrentTimeResponse>;
/**
* Gets the playback rate of the document timeline.
*/
getPlaybackRate(): Promise<Protocol.Animation.GetPlaybackRateResponse>;
/**
* Releases a set of animations to no longer be manipulated.
*/
releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise<void>;
/**
* Gets the remote object of the Animation.
*/
resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise<Protocol.Animation.ResolveAnimationResponse>;
/**
* Seek a set of animations to a particular time within each animation.
*/
seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise<void>;
/**
* Sets the paused state of a set of animations.
*/
setPaused(params: Protocol.Animation.SetPausedRequest): Promise<void>;
/**
* Sets the playback rate of the document timeline.
*/
setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise<void>;
/**
* Sets the timing of an animation node.
*/
setTiming(params: Protocol.Animation.SetTimingRequest): Promise<void>;
/**
* Event for when an animation has been cancelled.
*/
on(event: 'animationCanceled', listener: (params: Protocol.Animation.AnimationCanceledEvent) => void): void;
/**
* Event for each animation that has been created.
*/
on(event: 'animationCreated', listener: (params: Protocol.Animation.AnimationCreatedEvent) => void): void;
/**
* Event for animation that has been started.
*/
on(event: 'animationStarted', listener: (params: Protocol.Animation.AnimationStartedEvent) => void): void;
}
export interface ApplicationCacheApi {
/**
* Enables application cache domain notifications.
*/
enable(): Promise<void>;
/**
* Returns relevant application cache data for the document in given frame.
*/
getApplicationCacheForFrame(params: Protocol.ApplicationCache.GetApplicationCacheForFrameRequest): Promise<Protocol.ApplicationCache.GetApplicationCacheForFrameResponse>;
/**
* Returns array of frame identifiers with manifest urls for each frame containing a document
* associated with some application cache.
*/
getFramesWithManifests(): Promise<Protocol.ApplicationCache.GetFramesWithManifestsResponse>;
/**
* Returns manifest URL for document in the given frame.
*/
getManifestForFrame(params: Protocol.ApplicationCache.GetManifestForFrameRequest): Promise<Protocol.ApplicationCache.GetManifestForFrameResponse>;
on(event: 'applicationCacheStatusUpdated', listener: (params: Protocol.ApplicationCache.ApplicationCacheStatusUpdatedEvent) => void): void;
on(event: 'networkStateUpdated', listener: (params: Protocol.ApplicationCache.NetworkStateUpdatedEvent) => void): void;
}
export interface AuditsApi {
/**
* Returns the response body and size if it were re-encoded with the specified settings. Only
* applies to images.
*/
getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest): Promise<Protocol.Audits.GetEncodedResponseResponse>;
/**
* Disables issues domain, prevents further issues from being reported to the client.
*/
disable(): Promise<void>;
/**
* Enables issues domain, sends the issues collected so far to the client by means of the
* `issueAdded` event.
*/
enable(): Promise<void>;
on(event: 'issueAdded', listener: (params: Protocol.Audits.IssueAddedEvent) => void): void;
}
export interface BackgroundServiceApi {
/**
* Enables event updates for the service.
*/
startObserving(params: Protocol.BackgroundService.StartObservingRequest): Promise<void>;
/**
* Disables event updates for the service.
*/
stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise<void>;
/**
* Set the recording state for the service.
*/
setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise<void>;
/**
* Clears all stored data for the service.
*/
clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise<void>;
/**
* Called when the recording state for the service has been updated.
*/
on(event: 'recordingStateChanged', listener: (params: Protocol.BackgroundService.RecordingStateChangedEvent) => void): void;
/**
* Called with all existing backgroundServiceEvents when enabled, and all new
* events afterwards if enabled and recording.
*/
on(event: 'backgroundServiceEventReceived', listener: (params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent) => void): void;
}
export interface BrowserApi {
/**
* Set permission settings for given origin.
*/
setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<void>;
/**
* Grant specific permissions to the given origin and reject all others.
*/
grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise<void>;
/**
* Reset all permission management for all origins.
*/
resetPermissions(params: Protocol.Browser.ResetPermissionsRequest): Promise<void>;
/**
* Set the behavior when downloading a file.
*/
setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest): Promise<void>;
/**
* Close browser gracefully.
*/
close(): Promise<void>;
/**
* Crashes browser on the main thread.
*/
crash(): Promise<void>;
/**
* Crashes GPU process.
*/
crashGpuProcess(): Promise<void>;
/**
* Returns version information.
*/
getVersion(): Promise<Protocol.Browser.GetVersionResponse>;
/**
* Returns the command line switches for the browser process if, and only if
* --enable-automation is on the commandline.
*/
getBrowserCommandLine(): Promise<Protocol.Browser.GetBrowserCommandLineResponse>;
/**
* Get Chrome histograms.
*/
getHistograms(params: Protocol.Browser.GetHistogramsRequest): Promise<Protocol.Browser.GetHistogramsResponse>;
/**
* Get a Chrome histogram by name.
*/
getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise<Protocol.Browser.GetHistogramResponse>;
/**
* Get position and size of the browser window.
*/
getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest): Promise<Protocol.Browser.GetWindowBoundsResponse>;
/**
* Get the browser window that contains the devtools target.
*/
getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest): Promise<Protocol.Browser.GetWindowForTargetResponse>;
/**
* Set position and/or size of the browser window.
*/
setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest): Promise<void>;
/**
* Set dock tile details, platform-specific.
*/
setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise<void>;
}
export interface CSSApi {
/**
* Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the
* position specified by `location`.
*/
addRule(params: Protocol.CSS.AddRuleRequest): Promise<Protocol.CSS.AddRuleResponse>;
/**
* Returns all class names from specified stylesheet.
*/
collectClassNames(params: Protocol.CSS.CollectClassNamesRequest): Promise<Protocol.CSS.CollectClassNamesResponse>;
/**
* Creates a new special "via-inspector" stylesheet in the frame with given `frameId`.
*/
createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest): Promise<Protocol.CSS.CreateStyleSheetResponse>;
/**
* Disables the CSS agent for the given page.
*/
disable(): Promise<void>;
/**
* Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been
* enabled until the result of this command is received.
*/
enable(): Promise<void>;
/**
* Ensures that the given node will have specified pseudo-classes whenever its style is computed by
* the browser.
*/
forcePseudoState(params: Protocol.CSS.ForcePseudoStateRequest): Promise<void>;
getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest): Promise<Protocol.CSS.GetBackgroundColorsResponse>;
/**
* Returns the computed style for a DOM node identified by `nodeId`.
*/
getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest): Promise<Protocol.CSS.GetComputedStyleForNodeResponse>;
/**
* Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
* attributes) for a DOM node identified by `nodeId`.
*/
getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest): Promise<Protocol.CSS.GetInlineStylesForNodeResponse>;
/**
* Returns requested styles for a DOM node identified by `nodeId`.
*/
getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest): Promise<Protocol.CSS.GetMatchedStylesForNodeResponse>;
/**
* Returns all media queries parsed by the rendering engine.
*/
getMediaQueries(): Promise<Protocol.CSS.GetMediaQueriesResponse>;
/**
* Requests information about platform fonts which we used to render child TextNodes in the given
* node.
*/
getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest): Promise<Protocol.CSS.GetPlatformFontsForNodeResponse>;
/**
* Returns the current textual content for a stylesheet.
*/
getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest): Promise<Protocol.CSS.GetStyleSheetTextResponse>;
/**
* Starts tracking the given computed styles for updates. The specified array of properties
* replaces the one previously specified. Pass empty array to disable tracking.
* Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.
* The changes to computed style properties are only tracked for nodes pushed to the front-end
* by the DOM agent. If no changes to the tracked properties occur after the node has been pushed
* to the front-end, no updates will be issued for the node.
*/
trackComputedStyleUpdates(params: Protocol.CSS.TrackComputedStyleUpdatesRequest): Promise<void>;
/**
* Polls the next batch of computed style updates.
*/
takeComputedStyleUpdates(): Promise<Protocol.CSS.TakeComputedStyleUpdatesResponse>;
/**
* Find a rule with the given active property for the given node and set the new value for this
* property
*/
setEffectivePropertyValueForNode(params: Protocol.CSS.SetEffectivePropertyValueForNodeRequest): Promise<void>;
/**
* Modifies the keyframe rule key text.
*/
setKeyframeKey(params: Protocol.CSS.SetKeyframeKeyRequest): Promise<Protocol.CSS.SetKeyframeKeyResponse>;
/**
* Modifies the rule selector.
*/
setMediaText(params: Protocol.CSS.SetMediaTextRequest): Promise<Protocol.CSS.SetMediaTextResponse>;
/**
* Modifies the rule selector.
*/
setRuleSelector(params: Protocol.CSS.SetRuleSelectorRequest): Promise<Protocol.CSS.SetRuleSelectorResponse>;
/**
* Sets the new stylesheet text.
*/
setStyleSheetText(params: Protocol.CSS.SetStyleSheetTextRequest): Promise<Protocol.CSS.SetStyleSheetTextResponse>;
/**
* Applies specified style edits one after another in the given order.
*/
setStyleTexts(params: Protocol.CSS.SetStyleTextsRequest): Promise<Protocol.CSS.SetStyleTextsResponse>;
/**
* Enables the selector recording.
*/
startRuleUsageTracking(): Promise<void>;
/**
* Stop tracking rule usage and return the list of rules that were used since last call to
* `takeCoverageDelta` (or since start of coverage instrumentation)
*/
stopRuleUsageTracking(): Promise<Protocol.CSS.StopRuleUsageTrackingResponse>;
/**
* Obtain list of rules that became used since last call to this method (or since start of coverage
* instrumentation)
*/
takeCoverageDelta(): Promise<Protocol.CSS.TakeCoverageDeltaResponse>;
/**
* Enables/disables rendering of local CSS fonts (enabled by default).
*/
setLocalFontsEnabled(params: Protocol.CSS.SetLocalFontsEnabledRequest): Promise<void>;
/**
* Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded
* web font
*/
on(event: 'fontsUpdated', listener: (params: Protocol.CSS.FontsUpdatedEvent) => void): void;
/**
* Fires whenever a MediaQuery result changes (for example, after a browser window has been
* resized.) The current implementation considers only viewport-dependent media features.
*/
on(event: 'mediaQueryResultChanged', listener: () => void): void;
/**
* Fired whenever an active document stylesheet is added.
*/
on(event: 'styleSheetAdded', listener: (params: Protocol.CSS.StyleSheetAddedEvent) => void): void;
/**
* Fired whenever a stylesheet is changed as a result of the client operation.
*/
on(event: 'styleSheetChanged', listener: (params: Protocol.CSS.StyleSheetChangedEvent) => void): void;
/**
* Fired whenever an active document stylesheet is removed.
*/
on(event: 'styleSheetRemoved', listener: (params: Protocol.CSS.StyleSheetRemovedEvent) => void): void;
}
export interface CacheStorageApi {
/**
* Deletes a cache.
*/
deleteCache(params: Protocol.CacheStorage.DeleteCacheRequest): Promise<void>;
/**
* Deletes a cache entry.
*/
deleteEntry(params: Protocol.CacheStorage.DeleteEntryRequest): Promise<void>;
/**
* Requests cache names.
*/
requestCacheNames(params: Protocol.CacheStorage.RequestCacheNamesRequest): Promise<Protocol.CacheStorage.RequestCacheNamesResponse>;
/**
* Fetches cache entry.
*/
requestCachedResponse(params: Protocol.CacheStorage.RequestCachedResponseRequest): Promise<Protocol.CacheStorage.RequestCachedResponseResponse>;
/**
* Requests data from cache.
*/
requestEntries(params: Protocol.CacheStorage.RequestEntriesRequest): Promise<Protocol.CacheStorage.RequestEntriesResponse>;
}
export interface CastApi {
/**
* Starts observing for sinks that can be used for tab mirroring, and if set,
* sinks compatible with |presentationUrl| as well. When sinks are found, a
* |sinksUpdated| event is fired.
* Also starts observing for issue messages. When an issue is added or removed,
* an |issueUpdated| event is fired.
*/
enable(params: Protocol.Cast.EnableRequest): Promise<void>;
/**
* Stops observing for sinks and issues.
*/
disable(): Promise<void>;
/**
* Sets a sink to be used when the web page requests the browser to choose a
* sink via Presentation API, Remote Playback API, or Cast SDK.
*/
setSinkToUse(params: Protocol.Cast.SetSinkToUseRequest): Promise<void>;
/**
* Starts mirroring the tab to the sink.
*/
startTabMirroring(params: Protocol.Cast.StartTabMirroringRequest): Promise<void>;
/**
* Stops the active Cast session on the sink.
*/
stopCasting(params: Protocol.Cast.StopCastingRequest): Promise<void>;
/**
* This is fired whenever the list of available sinks changes. A sink is a
* device or a software surface that you can cast to.
*/
on(event: 'sinksUpdated', listener: (params: Protocol.Cast.SinksUpdatedEvent) => void): void;
/**
* This is fired whenever the outstanding issue/error message changes.
* |issueMessage| is empty if there is no issue.
*/
on(event: 'issueUpdated', listener: (params: Protocol.Cast.IssueUpdatedEvent) => void): void;
}
export interface DOMApi {
/**
* Collects class names for the node with given id and all of it's child nodes.
*/
collectClassNamesFromSubtree(params: Protocol.DOM.CollectClassNamesFromSubtreeRequest): Promise<Protocol.DOM.CollectClassNamesFromSubtreeResponse>;
/**
* Creates a deep copy of the specified node and places it into the target container before the
* given anchor.
*/
copyTo(params: Protocol.DOM.CopyToRequest): Promise<Protocol.DOM.CopyToResponse>;
/**
* Describes node given its id, does not require domain to be enabled. Does not start tracking any
* objects, can be used for automation.
*/
describeNode(params: Protocol.DOM.DescribeNodeRequest): Promise<Protocol.DOM.DescribeNodeResponse>;
/**
* Scrolls the specified rect of the given node into view if not already visible.
* Note: exactly one between nodeId, backendNodeId and objectId should be passed
* to identify the node.
*/
scrollIntoViewIfNeeded(params: Protocol.DOM.ScrollIntoViewIfNeededRequest): Promise<void>;
/**
* Disables DOM agent for the given page.
*/
disable(): Promise<void>;
/**
* Discards search results from the session with the given id. `getSearchResults` should no longer
* be called for that search.
*/
discardSearchResults(params: Protocol.DOM.DiscardSearchResultsRequest): Promise<void>;
/**
* Enables DOM agent for the given page.
*/
enable(): Promise<void>;
/**
* Focuses the given element.
*/
focus(params: Protocol.DOM.FocusRequest): Promise<void>;
/**
* Returns attributes for the specified node.
*/
getAttributes(params: Protocol.DOM.GetAttributesRequest): Promise<Protocol.DOM.GetAttributesResponse>;
/**
* Returns boxes for the given node.
*/
getBoxModel(params: Protocol.DOM.GetBoxModelRequest): Promise<Protocol.DOM.GetBoxModelResponse>;
/**
* Returns quads that describe node position on the page. This method
* might return multiple quads for inline nodes.
*/
getContentQuads(params: Protocol.DOM.GetContentQuadsRequest): Promise<Protocol.DOM.GetContentQuadsResponse>;
/**
* Returns the root DOM node (and optionally the subtree) to the caller.
*/
getDocument(params: Protocol.DOM.GetDocumentRequest): Promise<Protocol.DOM.GetDocumentResponse>;
/**
* Returns the root DOM node (and optionally the subtree) to the caller.
* Deprecated, as it is not designed to work well with the rest of the DOM agent.
* Use DOMSnapshot.captureSnapshot instead.
*/
getFlattenedDocument(params: Protocol.DOM.GetFlattenedDocumentRequest): Promise<Protocol.DOM.GetFlattenedDocumentResponse>;
/**
* Finds nodes with a given computed style in a subtree.
*/
getNodesForSubtreeByStyle(params: Protocol.DOM.GetNodesForSubtreeByStyleRequest): Promise<Protocol.DOM.GetNodesForSubtreeByStyleResponse>;
/**
* Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is
* either returned or not.
*/
getNodeForLocation(params: Protocol.DOM.GetNodeForLocationRequest): Promise<Protocol.DOM.GetNodeForLocationResponse>;
/**
* Returns node's HTML markup.
*/
getOuterHTML(params: Protocol.DOM.GetOuterHTMLRequest): Promise<Protocol.DOM.GetOuterHTMLResponse>;
/**
* Returns the id of the nearest ancestor that is a relayout boundary.
*/
getRelayoutBoundary(params: Protocol.DOM.GetRelayoutBoundaryRequest): Promise<Protocol.DOM.GetRelayoutBoundaryResponse>;
/**
* Returns search results from given `fromIndex` to given `toIndex` from the search with the given
* identifier.
*/
getSearchResults(params: Protocol.DOM.GetSearchResultsRequest): Promise<Protocol.DOM.GetSearchResultsResponse>;
/**
* Hides any highlight.
*/
hideHighlight(): Promise<void>;
/**
* Highlights DOM node.
*/
highlightNode(): Promise<void>;
/**
* Highlights given rectangle.
*/
highlightRect(): Promise<void>;
/**
* Marks last undoable state.
*/
markUndoableState(): Promise<void>;
/**
* Moves node into the new container, places it before the given anchor.
*/
moveTo(params: Protocol.DOM.MoveToRequest): Promise<Protocol.DOM.MoveToResponse>;
/**
* Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or
* `cancelSearch` to end this search session.
*/
performSearch(params: Protocol.DOM.PerformSearchRequest): Promise<Protocol.DOM.PerformSearchResponse>;
/**
* Requests that the node is sent to the caller given its path. // FIXME, use XPath
*/
pushNodeByPathToFrontend(params: Protocol.DOM.PushNodeByPathToFrontendRequest): Promise<Protocol.DOM.PushNodeByPathToFrontendResponse>;
/**
* Requests that a batch of nodes is sent to the caller given their backend node ids.
*/
pushNodesByBackendIdsToFrontend(params: Protocol.DOM.PushNodesByBackendIdsToFrontendRequest): Promise<Protocol.DOM.PushNodesByBackendIdsToFrontendResponse>;
/**
* Executes `querySelector` on a given node.
*/
querySelector(params: Protocol.DOM.QuerySelectorRequest): Promise<Protocol.DOM.QuerySelectorResponse>;
/**
* Executes `querySelectorAll` on a given node.
*/
querySelectorAll(params: Protocol.DOM.QuerySelectorAllRequest): Promise<Protocol.DOM.QuerySelectorAllResponse>;
/**
* Re-does the last undone action.
*/
redo(): Promise<void>;
/**
* Removes attribute with given name from an element with given id.
*/
removeAttribute(params: Protocol.DOM.RemoveAttributeRequest): Promise<void>;
/**
* Removes node with given id.
*/
removeNode(params: Protocol.DOM.RemoveNodeRequest): Promise<void>;
/**
* Requests that children of the node with given id are returned to the caller in form of
* `setChildNodes` events where not only immediate children are retrieved, but all children down to
* the specified depth.
*/
requestChildNodes(params: Protocol.DOM.RequestChildNodesRequest): Promise<void>;
/**
* Requests that the node is sent to the caller given the JavaScript node object reference. All
* nodes that form the path from the node to the root are also sent to the client as a series of
* `setChildNodes` notifications.
*/
requestNode(params: Protocol.DOM.RequestNodeRequest): Promise<Protocol.DOM.RequestNodeResponse>;
/**
* Resolves the JavaScript node object for a given NodeId or BackendNodeId.
*/
resolveNode(params: Protocol.DOM.ResolveNodeRequest): Promise<Protocol.DOM.ResolveNodeResponse>;
/**
* Sets attribute for an element with given id.
*/
setAttributeValue(params: Protocol.DOM.SetAttributeValueRequest): Promise<void>;
/**
* Sets attributes on element with given id. This method is useful when user edits some existing
* attribute value and types in several attribute name/value pairs.
*/
setAttributesAsText(params: Protocol.DOM.SetAttributesAsTextRequest): Promise<void>;
/**
* Sets files for the given file input element.
*/
setFileInputFiles(params: Protocol.DOM.SetFileInputFilesRequest): Promise<void>;
/**
* Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
*/
setNodeStackTracesEnabled(params: Protocol.DOM.SetNodeStackTracesEnabledRequest): Promise<void>;
/**
* Gets stack traces associated with a Node. As of now, only provides