devtools-protocol
Version:
The Chrome DevTools Protocol JSON
1,028 lines (803 loc) • 314 kB
TypeScript
// Copyright (c) 2026 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**********************************************************************
* Auto-generated by protocol-dts-generator.ts. Do not edit manually. *
**********************************************************************/
import Protocol from './protocol'
/**
* API generated from Protocol commands and events.
*/
export namespace ProtocolTestsProxyApi {
export interface ProtocolApi {
Console: ConsoleApi;
Debugger: DebuggerApi;
HeapProfiler: HeapProfilerApi;
Profiler: ProfilerApi;
Runtime: RuntimeApi;
Schema: SchemaApi;
Accessibility: AccessibilityApi;
Ads: AdsApi;
Animation: AnimationApi;
Audits: AuditsApi;
Autofill: AutofillApi;
BackgroundService: BackgroundServiceApi;
BluetoothEmulation: BluetoothEmulationApi;
Browser: BrowserApi;
CSS: CSSApi;
CacheStorage: CacheStorageApi;
Cast: CastApi;
CrashReportContext: CrashReportContextApi;
DOM: DOMApi;
DOMDebugger: DOMDebuggerApi;
DOMSnapshot: DOMSnapshotApi;
DOMStorage: DOMStorageApi;
DeviceAccess: DeviceAccessApi;
DeviceOrientation: DeviceOrientationApi;
DigitalCredentials: DigitalCredentialsApi;
Emulation: EmulationApi;
EventBreakpoints: EventBreakpointsApi;
Extensions: ExtensionsApi;
FedCm: FedCmApi;
Fetch: FetchApi;
FileSystem: FileSystemApi;
HeadlessExperimental: HeadlessExperimentalApi;
IO: IOApi;
IndexedDB: IndexedDBApi;
Input: InputApi;
Inspector: InspectorApi;
LayerTree: LayerTreeApi;
Log: LogApi;
Media: MediaApi;
Memory: MemoryApi;
Network: NetworkApi;
Overlay: OverlayApi;
PWA: PWAApi;
Page: PageApi;
Performance: PerformanceApi;
PerformanceTimeline: PerformanceTimelineApi;
Preload: PreloadApi;
Security: SecurityApi;
ServiceWorker: ServiceWorkerApi;
SmartCardEmulation: SmartCardEmulationApi;
Storage: StorageApi;
SystemInfo: SystemInfoApi;
Target: TargetApi;
Tethering: TetheringApi;
Tracing: TracingApi;
WebAudio: WebAudioApi;
WebAuthn: WebAuthnApi;
WebMCP: WebMCPApi;
}
export interface ConsoleApi {
/**
* Does nothing.
*/
clearMessages(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disables console domain, prevents further console messages from being reported to the client.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables console domain, sends the messages collected so far to the client by means of the
* `messageAdded` notification.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Issued when new console message is added.
*/
onMessageAdded(listener: (event: { params: Protocol.Console.MessageAddedEvent }) => void): void;
offMessageAdded(listener: (event: { params: Protocol.Console.MessageAddedEvent }) => void): void;
onceMessageAdded(eventMatcher?: (event: { params: Protocol.Console.MessageAddedEvent }) => boolean): Promise<{ params: Protocol.Console.MessageAddedEvent }>;
}
export interface DebuggerApi {
/**
* Continues execution until specific location is reached.
*/
continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disables debugger for given page.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* 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<{id: number, result: Protocol.Debugger.EnableResponse, sessionId: string}>;
/**
* Evaluates expression on a given call frame.
*/
evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest): Promise<{id: number, result: Protocol.Debugger.EvaluateOnCallFrameResponse, sessionId: string}>;
/**
* Returns possible locations for breakpoint. scriptId in start and end range locations should be
* the same.
*/
getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest): Promise<{id: number, result: Protocol.Debugger.GetPossibleBreakpointsResponse, sessionId: string}>;
/**
* Returns source for the script with given id.
*/
getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest): Promise<{id: number, result: Protocol.Debugger.GetScriptSourceResponse, sessionId: string}>;
/**
* @experimental
*/
disassembleWasmModule(params: Protocol.Debugger.DisassembleWasmModuleRequest): Promise<{id: number, result: Protocol.Debugger.DisassembleWasmModuleResponse, sessionId: string}>;
/**
* Disassemble the next chunk of lines for the module corresponding to the
* stream. If disassembly is complete, this API will invalidate the streamId
* and return an empty chunk. Any subsequent calls for the now invalid stream
* will return errors.
* @experimental
*/
nextWasmDisassemblyChunk(params: Protocol.Debugger.NextWasmDisassemblyChunkRequest): Promise<{id: number, result: Protocol.Debugger.NextWasmDisassemblyChunkResponse, sessionId: string}>;
/**
* This command is deprecated. Use getScriptSource instead.
* @deprecated
*/
getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest): Promise<{id: number, result: Protocol.Debugger.GetWasmBytecodeResponse, sessionId: string}>;
/**
* Returns stack trace with given `stackTraceId`.
* @experimental
*/
getStackTrace(params: Protocol.Debugger.GetStackTraceRequest): Promise<{id: number, result: Protocol.Debugger.GetStackTraceResponse, sessionId: string}>;
/**
* Stops on the next JavaScript statement.
*/
pause(): Promise<{id: number, result: void, sessionId: string}>;
/**
* @deprecated
* @experimental
*/
pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Removes JavaScript breakpoint.
*/
removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Restarts particular call frame from the beginning. The old, deprecated
* behavior of `restartFrame` is to stay paused and allow further CDP commands
* after a restart was scheduled. This can cause problems with restarting, so
* we now continue execution immediatly after it has been scheduled until we
* reach the beginning of the restarted frame.
*
* To stay back-wards compatible, `restartFrame` now expects a `mode`
* parameter to be present. If the `mode` parameter is missing, `restartFrame`
* errors out.
*
* The various return values are deprecated and `callFrames` is always empty.
* Use the call frames from the `Debugger#paused` events instead, that fires
* once V8 pauses at the beginning of the restarted function.
*/
restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<{id: number, result: Protocol.Debugger.RestartFrameResponse, sessionId: string}>;
/**
* Resumes JavaScript execution.
*/
resume(params: Protocol.Debugger.ResumeRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Searches for given string in script content.
*/
searchInContent(params: Protocol.Debugger.SearchInContentRequest): Promise<{id: number, result: Protocol.Debugger.SearchInContentResponse, sessionId: string}>;
/**
* Enables or disables async call stacks tracking.
*/
setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Replace previous blackbox execution contexts with passed ones. Forces backend to skip
* stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by
* performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
* @experimental
*/
setBlackboxExecutionContexts(params: Protocol.Debugger.SetBlackboxExecutionContextsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* 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.
* @experimental
*/
setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* 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.
* @experimental
*/
setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets JavaScript breakpoint at a given location.
*/
setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest): Promise<{id: number, result: Protocol.Debugger.SetBreakpointResponse, sessionId: string}>;
/**
* Sets instrumentation breakpoint.
*/
setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest): Promise<{id: number, result: Protocol.Debugger.SetInstrumentationBreakpointResponse, sessionId: string}>;
/**
* 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<{id: number, result: Protocol.Debugger.SetBreakpointByUrlResponse, sessionId: string}>;
/**
* 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.
* @experimental
*/
setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest): Promise<{id: number, result: Protocol.Debugger.SetBreakpointOnFunctionCallResponse, sessionId: string}>;
/**
* Activates / deactivates all breakpoints on the page.
*/
setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions,
* or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.
*/
setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Changes return value in top frame. Available only at return break position.
* @experimental
*/
setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Edits JavaScript source live.
*
* In general, functions that are currently on the stack can not be edited with
* a single exception: If the edited function is the top-most stack frame and
* that is the only activation of that function on the stack. In this case
* the live edit will be successful and a `Debugger.restartFrame` for the
* top-most function is automatically triggered.
*/
setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest): Promise<{id: number, result: Protocol.Debugger.SetScriptSourceResponse, sessionId: string}>;
/**
* Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
*/
setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Changes value of variable in a callframe. Object-based scopes are not supported and must be
* mutated manually.
*/
setVariableValue(params: Protocol.Debugger.SetVariableValueRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Steps into the function call.
*/
stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Steps out of the function call.
*/
stepOut(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Steps over the statement.
*/
stepOver(params: Protocol.Debugger.StepOverRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Fired when breakpoint is resolved to an actual script and location.
* Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event.
* @deprecated
*/
onBreakpointResolved(listener: (event: { params: Protocol.Debugger.BreakpointResolvedEvent }) => void): void;
offBreakpointResolved(listener: (event: { params: Protocol.Debugger.BreakpointResolvedEvent }) => void): void;
onceBreakpointResolved(eventMatcher?: (event: { params: Protocol.Debugger.BreakpointResolvedEvent }) => boolean): Promise<{ params: Protocol.Debugger.BreakpointResolvedEvent }>;
/**
* Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
*/
onPaused(listener: (event: { params: Protocol.Debugger.PausedEvent }) => void): void;
offPaused(listener: (event: { params: Protocol.Debugger.PausedEvent }) => void): void;
oncePaused(eventMatcher?: (event: { params: Protocol.Debugger.PausedEvent }) => boolean): Promise<{ params: Protocol.Debugger.PausedEvent }>;
/**
* Fired when the virtual machine resumed execution.
*/
onResumed(listener: () => void): void;
offResumed(listener: () => void): void;
onceResumed(eventMatcher?: () => boolean): Promise<void>;
/**
* Fired when virtual machine fails to parse the script.
*/
onScriptFailedToParse(listener: (event: { params: Protocol.Debugger.ScriptFailedToParseEvent }) => void): void;
offScriptFailedToParse(listener: (event: { params: Protocol.Debugger.ScriptFailedToParseEvent }) => void): void;
onceScriptFailedToParse(eventMatcher?: (event: { params: Protocol.Debugger.ScriptFailedToParseEvent }) => boolean): Promise<{ params: Protocol.Debugger.ScriptFailedToParseEvent }>;
/**
* Fired when virtual machine parses script. This event is also fired for all known and uncollected
* scripts upon enabling debugger.
*/
onScriptParsed(listener: (event: { params: Protocol.Debugger.ScriptParsedEvent }) => void): void;
offScriptParsed(listener: (event: { params: Protocol.Debugger.ScriptParsedEvent }) => void): void;
onceScriptParsed(eventMatcher?: (event: { params: Protocol.Debugger.ScriptParsedEvent }) => boolean): Promise<{ params: Protocol.Debugger.ScriptParsedEvent }>;
}
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<{id: number, result: void, sessionId: string}>;
collectGarbage(): Promise<{id: number, result: void, sessionId: string}>;
disable(): Promise<{id: number, result: void, sessionId: string}>;
enable(): Promise<{id: number, result: void, sessionId: string}>;
getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest): Promise<{id: number, result: Protocol.HeapProfiler.GetHeapObjectIdResponse, sessionId: string}>;
getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest): Promise<{id: number, result: Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse, sessionId: string}>;
getSamplingProfile(): Promise<{id: number, result: Protocol.HeapProfiler.GetSamplingProfileResponse, sessionId: string}>;
startSampling(params: Protocol.HeapProfiler.StartSamplingRequest): Promise<{id: number, result: void, sessionId: string}>;
startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest): Promise<{id: number, result: void, sessionId: string}>;
stopSampling(): Promise<{id: number, result: Protocol.HeapProfiler.StopSamplingResponse, sessionId: string}>;
stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest): Promise<{id: number, result: void, sessionId: string}>;
takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest): Promise<{id: number, result: void, sessionId: string}>;
onAddHeapSnapshotChunk(listener: (event: { params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent }) => void): void;
offAddHeapSnapshotChunk(listener: (event: { params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent }) => void): void;
onceAddHeapSnapshotChunk(eventMatcher?: (event: { params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent }) => boolean): Promise<{ params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent }>;
/**
* If heap objects tracking has been started then backend may send update for one or more fragments
*/
onHeapStatsUpdate(listener: (event: { params: Protocol.HeapProfiler.HeapStatsUpdateEvent }) => void): void;
offHeapStatsUpdate(listener: (event: { params: Protocol.HeapProfiler.HeapStatsUpdateEvent }) => void): void;
onceHeapStatsUpdate(eventMatcher?: (event: { params: Protocol.HeapProfiler.HeapStatsUpdateEvent }) => boolean): Promise<{ params: Protocol.HeapProfiler.HeapStatsUpdateEvent }>;
/**
* 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.
*/
onLastSeenObjectId(listener: (event: { params: Protocol.HeapProfiler.LastSeenObjectIdEvent }) => void): void;
offLastSeenObjectId(listener: (event: { params: Protocol.HeapProfiler.LastSeenObjectIdEvent }) => void): void;
onceLastSeenObjectId(eventMatcher?: (event: { params: Protocol.HeapProfiler.LastSeenObjectIdEvent }) => boolean): Promise<{ params: Protocol.HeapProfiler.LastSeenObjectIdEvent }>;
onReportHeapSnapshotProgress(listener: (event: { params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent }) => void): void;
offReportHeapSnapshotProgress(listener: (event: { params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent }) => void): void;
onceReportHeapSnapshotProgress(eventMatcher?: (event: { params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent }) => boolean): Promise<{ params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent }>;
onResetProfiles(listener: () => void): void;
offResetProfiles(listener: () => void): void;
onceResetProfiles(eventMatcher?: () => boolean): Promise<void>;
}
export interface ProfilerApi {
disable(): Promise<{id: number, result: void, sessionId: string}>;
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Collect coverage data for the current isolate. The coverage data may be incomplete due to
* garbage collection.
*/
getBestEffortCoverage(): Promise<{id: number, result: Protocol.Profiler.GetBestEffortCoverageResponse, sessionId: string}>;
/**
* Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
*/
setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest): Promise<{id: number, result: void, sessionId: string}>;
start(): Promise<{id: number, result: void, sessionId: string}>;
/**
* 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<{id: number, result: Protocol.Profiler.StartPreciseCoverageResponse, sessionId: string}>;
stop(): Promise<{id: number, result: Protocol.Profiler.StopResponse, sessionId: string}>;
/**
* Disable precise code coverage. Disabling releases unnecessary execution count records and allows
* executing optimized code.
*/
stopPreciseCoverage(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Collect coverage data for the current isolate, and resets execution counters. Precise code
* coverage needs to have started.
*/
takePreciseCoverage(): Promise<{id: number, result: Protocol.Profiler.TakePreciseCoverageResponse, sessionId: string}>;
onConsoleProfileFinished(listener: (event: { params: Protocol.Profiler.ConsoleProfileFinishedEvent }) => void): void;
offConsoleProfileFinished(listener: (event: { params: Protocol.Profiler.ConsoleProfileFinishedEvent }) => void): void;
onceConsoleProfileFinished(eventMatcher?: (event: { params: Protocol.Profiler.ConsoleProfileFinishedEvent }) => boolean): Promise<{ params: Protocol.Profiler.ConsoleProfileFinishedEvent }>;
/**
* Sent when new profile recording is started using console.profile() call.
*/
onConsoleProfileStarted(listener: (event: { params: Protocol.Profiler.ConsoleProfileStartedEvent }) => void): void;
offConsoleProfileStarted(listener: (event: { params: Protocol.Profiler.ConsoleProfileStartedEvent }) => void): void;
onceConsoleProfileStarted(eventMatcher?: (event: { params: Protocol.Profiler.ConsoleProfileStartedEvent }) => boolean): Promise<{ params: Protocol.Profiler.ConsoleProfileStartedEvent }>;
/**
* 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 immediately at a certain point in time.
* @experimental
*/
onPreciseCoverageDeltaUpdate(listener: (event: { params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent }) => void): void;
offPreciseCoverageDeltaUpdate(listener: (event: { params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent }) => void): void;
oncePreciseCoverageDeltaUpdate(eventMatcher?: (event: { params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent }) => boolean): Promise<{ params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent }>;
}
export interface RuntimeApi {
/**
* Add handler to promise with given promise object id.
*/
awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<{id: number, result: Protocol.Runtime.AwaitPromiseResponse, sessionId: string}>;
/**
* 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<{id: number, result: Protocol.Runtime.CallFunctionOnResponse, sessionId: string}>;
/**
* Compiles expression.
*/
compileScript(params: Protocol.Runtime.CompileScriptRequest): Promise<{id: number, result: Protocol.Runtime.CompileScriptResponse, sessionId: string}>;
/**
* Disables reporting of execution contexts creation.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Discards collected exceptions and console API calls.
*/
discardConsoleEntries(): Promise<{id: number, result: void, sessionId: string}>;
/**
* 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<{id: number, result: void, sessionId: string}>;
/**
* Evaluates expression on global object.
*/
evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<{id: number, result: Protocol.Runtime.EvaluateResponse, sessionId: string}>;
/**
* Returns the isolate id.
* @experimental
*/
getIsolateId(): Promise<{id: number, result: Protocol.Runtime.GetIsolateIdResponse, sessionId: string}>;
/**
* Returns the JavaScript heap usage.
* It is the total usage of the corresponding isolate not scoped to a particular Runtime.
* @experimental
*/
getHeapUsage(): Promise<{id: number, result: Protocol.Runtime.GetHeapUsageResponse, sessionId: string}>;
/**
* Returns properties of a given object. Object group of the result is inherited from the target
* object.
*/
getProperties(params: Protocol.Runtime.GetPropertiesRequest): Promise<{id: number, result: Protocol.Runtime.GetPropertiesResponse, sessionId: string}>;
/**
* Returns all let, const and class variables from global scope.
*/
globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest): Promise<{id: number, result: Protocol.Runtime.GlobalLexicalScopeNamesResponse, sessionId: string}>;
queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<{id: number, result: Protocol.Runtime.QueryObjectsResponse, sessionId: string}>;
/**
* Releases remote object with given id.
*/
releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Releases all remote objects that belong to a given group.
*/
releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Tells inspected instance to run if it was waiting for debugger to attach.
*/
runIfWaitingForDebugger(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Runs script with given id in a given context.
*/
runScript(params: Protocol.Runtime.RunScriptRequest): Promise<{id: number, result: Protocol.Runtime.RunScriptResponse, sessionId: string}>;
/**
* Enables or disables async call stacks tracking.
*/
setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* @experimental
*/
setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* @experimental
*/
setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Terminate current or next JavaScript execution.
* Will cancel the termination when the outer-most script execution ends.
* @experimental
*/
terminateExecution(): Promise<{id: number, result: void, sessionId: string}>;
/**
* 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.
* 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<{id: number, result: void, sessionId: string}>;
/**
* 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<{id: number, result: void, sessionId: string}>;
/**
* This method tries to lookup and populate exception details for a
* JavaScript Error object.
* Note that the stackTrace portion of the resulting exceptionDetails will
* only be populated if the Runtime domain was enabled at the time when the
* Error was thrown.
* @experimental
*/
getExceptionDetails(params: Protocol.Runtime.GetExceptionDetailsRequest): Promise<{id: number, result: Protocol.Runtime.GetExceptionDetailsResponse, sessionId: string}>;
/**
* Notification is issued every time when binding is called.
* @experimental
*/
onBindingCalled(listener: (event: { params: Protocol.Runtime.BindingCalledEvent }) => void): void;
offBindingCalled(listener: (event: { params: Protocol.Runtime.BindingCalledEvent }) => void): void;
onceBindingCalled(eventMatcher?: (event: { params: Protocol.Runtime.BindingCalledEvent }) => boolean): Promise<{ params: Protocol.Runtime.BindingCalledEvent }>;
/**
* Issued when console API was called.
*/
onConsoleAPICalled(listener: (event: { params: Protocol.Runtime.ConsoleAPICalledEvent }) => void): void;
offConsoleAPICalled(listener: (event: { params: Protocol.Runtime.ConsoleAPICalledEvent }) => void): void;
onceConsoleAPICalled(eventMatcher?: (event: { params: Protocol.Runtime.ConsoleAPICalledEvent }) => boolean): Promise<{ params: Protocol.Runtime.ConsoleAPICalledEvent }>;
/**
* Issued when unhandled exception was revoked.
*/
onExceptionRevoked(listener: (event: { params: Protocol.Runtime.ExceptionRevokedEvent }) => void): void;
offExceptionRevoked(listener: (event: { params: Protocol.Runtime.ExceptionRevokedEvent }) => void): void;
onceExceptionRevoked(eventMatcher?: (event: { params: Protocol.Runtime.ExceptionRevokedEvent }) => boolean): Promise<{ params: Protocol.Runtime.ExceptionRevokedEvent }>;
/**
* Issued when exception was thrown and unhandled.
*/
onExceptionThrown(listener: (event: { params: Protocol.Runtime.ExceptionThrownEvent }) => void): void;
offExceptionThrown(listener: (event: { params: Protocol.Runtime.ExceptionThrownEvent }) => void): void;
onceExceptionThrown(eventMatcher?: (event: { params: Protocol.Runtime.ExceptionThrownEvent }) => boolean): Promise<{ params: Protocol.Runtime.ExceptionThrownEvent }>;
/**
* Issued when new execution context is created.
*/
onExecutionContextCreated(listener: (event: { params: Protocol.Runtime.ExecutionContextCreatedEvent }) => void): void;
offExecutionContextCreated(listener: (event: { params: Protocol.Runtime.ExecutionContextCreatedEvent }) => void): void;
onceExecutionContextCreated(eventMatcher?: (event: { params: Protocol.Runtime.ExecutionContextCreatedEvent }) => boolean): Promise<{ params: Protocol.Runtime.ExecutionContextCreatedEvent }>;
/**
* Issued when execution context is destroyed.
*/
onExecutionContextDestroyed(listener: (event: { params: Protocol.Runtime.ExecutionContextDestroyedEvent }) => void): void;
offExecutionContextDestroyed(listener: (event: { params: Protocol.Runtime.ExecutionContextDestroyedEvent }) => void): void;
onceExecutionContextDestroyed(eventMatcher?: (event: { params: Protocol.Runtime.ExecutionContextDestroyedEvent }) => boolean): Promise<{ params: Protocol.Runtime.ExecutionContextDestroyedEvent }>;
/**
* Issued when all executionContexts were cleared in browser
*/
onExecutionContextsCleared(listener: () => void): void;
offExecutionContextsCleared(listener: () => void): void;
onceExecutionContextsCleared(eventMatcher?: () => boolean): Promise<void>;
/**
* Issued when object should be inspected (for example, as a result of inspect() command line API
* call).
*/
onInspectRequested(listener: (event: { params: Protocol.Runtime.InspectRequestedEvent }) => void): void;
offInspectRequested(listener: (event: { params: Protocol.Runtime.InspectRequestedEvent }) => void): void;
onceInspectRequested(eventMatcher?: (event: { params: Protocol.Runtime.InspectRequestedEvent }) => boolean): Promise<{ params: Protocol.Runtime.InspectRequestedEvent }>;
}
export interface SchemaApi {
/**
* Returns supported domains.
*/
getDomains(): Promise<{id: number, result: Protocol.Schema.GetDomainsResponse, sessionId: string}>;
}
export interface AccessibilityApi {
/**
* Disables the accessibility domain.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* 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<{id: number, result: void, sessionId: string}>;
/**
* Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
* @experimental
*/
getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise<{id: number, result: Protocol.Accessibility.GetPartialAXTreeResponse, sessionId: string}>;
/**
* Fetches the entire accessibility tree for the root Document
* @experimental
*/
getFullAXTree(params: Protocol.Accessibility.GetFullAXTreeRequest): Promise<{id: number, result: Protocol.Accessibility.GetFullAXTreeResponse, sessionId: string}>;
/**
* Fetches the root node.
* Requires `enable()` to have been called previously.
* @experimental
*/
getRootAXNode(params: Protocol.Accessibility.GetRootAXNodeRequest): Promise<{id: number, result: Protocol.Accessibility.GetRootAXNodeResponse, sessionId: string}>;
/**
* Fetches a node and all ancestors up to and including the root.
* Requires `enable()` to have been called previously.
* @experimental
*/
getAXNodeAndAncestors(params: Protocol.Accessibility.GetAXNodeAndAncestorsRequest): Promise<{id: number, result: Protocol.Accessibility.GetAXNodeAndAncestorsResponse, sessionId: string}>;
/**
* Fetches a particular accessibility node by AXNodeId.
* Requires `enable()` to have been called previously.
* @experimental
*/
getChildAXNodes(params: Protocol.Accessibility.GetChildAXNodesRequest): Promise<{id: number, result: Protocol.Accessibility.GetChildAXNodesResponse, sessionId: string}>;
/**
* Query a DOM node's accessibility subtree for accessible name and role.
* This command computes the name and role for all nodes in the subtree, including those that are
* ignored for accessibility, and returns those that match the specified name and role. If no DOM
* node is specified, or the DOM node does not exist, the command returns an error. If neither
* `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.
* @experimental
*/
queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest): Promise<{id: number, result: Protocol.Accessibility.QueryAXTreeResponse, sessionId: string}>;
/**
* The loadComplete event mirrors the load complete event sent by the browser to assistive
* technology when the web page has finished loading.
* @experimental
*/
onLoadComplete(listener: (event: { params: Protocol.Accessibility.LoadCompleteEvent }) => void): void;
offLoadComplete(listener: (event: { params: Protocol.Accessibility.LoadCompleteEvent }) => void): void;
onceLoadComplete(eventMatcher?: (event: { params: Protocol.Accessibility.LoadCompleteEvent }) => boolean): Promise<{ params: Protocol.Accessibility.LoadCompleteEvent }>;
/**
* The nodesUpdated event is sent every time a previously requested node has changed the in tree.
* @experimental
*/
onNodesUpdated(listener: (event: { params: Protocol.Accessibility.NodesUpdatedEvent }) => void): void;
offNodesUpdated(listener: (event: { params: Protocol.Accessibility.NodesUpdatedEvent }) => void): void;
onceNodesUpdated(eventMatcher?: (event: { params: Protocol.Accessibility.NodesUpdatedEvent }) => boolean): Promise<{ params: Protocol.Accessibility.NodesUpdatedEvent }>;
}
export interface AdsApi {
/**
* Retrieves ad metrics for the current page.
*/
getAdMetrics(): Promise<{id: number, result: Protocol.Ads.GetAdMetricsResponse, sessionId: string}>;
}
export interface AnimationApi {
/**
* Disables animation domain notifications.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables animation domain notifications.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Returns the current time of the an animation.
*/
getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise<{id: number, result: Protocol.Animation.GetCurrentTimeResponse, sessionId: string}>;
/**
* Gets the playback rate of the document timeline.
*/
getPlaybackRate(): Promise<{id: number, result: Protocol.Animation.GetPlaybackRateResponse, sessionId: string}>;
/**
* Releases a set of animations to no longer be manipulated.
*/
releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Gets the remote object of the Animation.
*/
resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise<{id: number, result: Protocol.Animation.ResolveAnimationResponse, sessionId: string}>;
/**
* Seek a set of animations to a particular time within each animation.
*/
seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets the paused state of a set of animations.
*/
setPaused(params: Protocol.Animation.SetPausedRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets the playback rate of the document timeline.
*/
setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Sets the timing of an animation node.
*/
setTiming(params: Protocol.Animation.SetTimingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Event for when an animation has been cancelled.
*/
onAnimationCanceled(listener: (event: { params: Protocol.Animation.AnimationCanceledEvent }) => void): void;
offAnimationCanceled(listener: (event: { params: Protocol.Animation.AnimationCanceledEvent }) => void): void;
onceAnimationCanceled(eventMatcher?: (event: { params: Protocol.Animation.AnimationCanceledEvent }) => boolean): Promise<{ params: Protocol.Animation.AnimationCanceledEvent }>;
/**
* Event for each animation that has been created.
*/
onAnimationCreated(listener: (event: { params: Protocol.Animation.AnimationCreatedEvent }) => void): void;
offAnimationCreated(listener: (event: { params: Protocol.Animation.AnimationCreatedEvent }) => void): void;
onceAnimationCreated(eventMatcher?: (event: { params: Protocol.Animation.AnimationCreatedEvent }) => boolean): Promise<{ params: Protocol.Animation.AnimationCreatedEvent }>;
/**
* Event for animation that has been started.
*/
onAnimationStarted(listener: (event: { params: Protocol.Animation.AnimationStartedEvent }) => void): void;
offAnimationStarted(listener: (event: { params: Protocol.Animation.AnimationStartedEvent }) => void): void;
onceAnimationStarted(eventMatcher?: (event: { params: Protocol.Animation.AnimationStartedEvent }) => boolean): Promise<{ params: Protocol.Animation.AnimationStartedEvent }>;
/**
* Event for animation that has been updated.
*/
onAnimationUpdated(listener: (event: { params: Protocol.Animation.AnimationUpdatedEvent }) => void): void;
offAnimationUpdated(listener: (event: { params: Protocol.Animation.AnimationUpdatedEvent }) => void): void;
onceAnimationUpdated(eventMatcher?: (event: { params: Protocol.Animation.AnimationUpdatedEvent }) => boolean): Promise<{ params: Protocol.Animation.AnimationUpdatedEvent }>;
}
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<{id: number, result: Protocol.Audits.GetEncodedResponseResponse, sessionId: string}>;
/**
* Disables issues domain, prevents further issues from being reported to the client.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables issues domain, sends the issues collected so far to the client by means of the
* `issueAdded` event.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Runs the form issues check for the target page. Found issues are reported
* using Audits.issueAdded event.
*/
checkFormsIssues(): Promise<{id: number, result: Protocol.Audits.CheckFormsIssuesResponse, sessionId: string}>;
onIssueAdded(listener: (event: { params: Protocol.Audits.IssueAddedEvent }) => void): void;
offIssueAdded(listener: (event: { params: Protocol.Audits.IssueAddedEvent }) => void): void;
onceIssueAdded(eventMatcher?: (event: { params: Protocol.Audits.IssueAddedEvent }) => boolean): Promise<{ params: Protocol.Audits.IssueAddedEvent }>;
}
export interface AutofillApi {
/**
* Trigger autofill on a form identified by the fieldId.
* If the field and related form cannot be autofilled, returns an error.
*/
trigger(params: Protocol.Autofill.TriggerRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Set addresses so that developers can verify their forms implementation.
*/
setAddresses(params: Protocol.Autofill.SetAddressesRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disables autofill domain notifications.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Enables autofill domain notifications.
*/
enable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Emitted when an address form is filled.
*/
onAddressFormFilled(listener: (event: { params: Protocol.Autofill.AddressFormFilledEvent }) => void): void;
offAddressFormFilled(listener: (event: { params: Protocol.Autofill.AddressFormFilledEvent }) => void): void;
onceAddressFormFilled(eventMatcher?: (event: { params: Protocol.Autofill.AddressFormFilledEvent }) => boolean): Promise<{ params: Protocol.Autofill.AddressFormFilledEvent }>;
}
export interface BackgroundServiceApi {
/**
* Enables event updates for the service.
*/
startObserving(params: Protocol.BackgroundService.StartObservingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disables event updates for the service.
*/
stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Set the recording state for the service.
*/
setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Clears all stored data for the service.
*/
clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Called when the recording state for the service has been updated.
*/
onRecordingStateChanged(listener: (event: { params: Protocol.BackgroundService.RecordingStateChangedEvent }) => void): void;
offRecordingStateChanged(listener: (event: { params: Protocol.BackgroundService.RecordingStateChangedEvent }) => void): void;
onceRecordingStateChanged(eventMatcher?: (event: { params: Protocol.BackgroundService.RecordingStateChangedEvent }) => boolean): Promise<{ params: Protocol.BackgroundService.RecordingStateChangedEvent }>;
/**
* Called with all existing backgroundServiceEvents when enabled, and all new
* events afterwards if enabled and recording.
*/
onBackgroundServiceEventReceived(listener: (event: { params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent }) => void): void;
offBackgroundServiceEventReceived(listener: (event: { params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent }) => void): void;
onceBackgroundServiceEventReceived(eventMatcher?: (event: { params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent }) => boolean): Promise<{ params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent }>;
}
export interface BluetoothEmulationApi {
/**
* Enable the BluetoothEmulation domain.
*/
enable(params: Protocol.BluetoothEmulation.EnableRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Set the state of the simulated central.
*/
setSimulatedCentralState(params: Protocol.BluetoothEmulation.SetSimulatedCentralStateRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Disable the BluetoothEmulation domain.
*/
disable(): Promise<{id: number, result: void, sessionId: string}>;
/**
* Simulates a peripheral with |address|, |name| and |knownServiceUuids|
* that has already been connected to the system.
*/
simulatePreconnectedPeripheral(params: Protocol.BluetoothEmulation.SimulatePreconnectedPeripheralRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Simulates an advertisement packet described in |entry| being received by
* the central.
*/
simulateAdvertisement(params: Protocol.BluetoothEmulation.SimulateAdvertisementRequest): Promise<{id: number, result: void, sessionId: string}>;
/**
* Simulates the response code from the peripheral with |ad