This document is the reference for the commands, events and types this browser adds to the Chrome DevTools Protocol (CDP). Everything here is additional to stock Chromium's protocol; the stock domains are documented at https://chromedevtools.github.io/devtools-protocol/ and are not repeated.
The additions live in three domains:
- Browser: reading a URL without a tab (
agentFetch), browser-wide network recording (startRecordingand friends), and recording a tab to a video file (startVideoRecordingand friends). - Input: pointer, keyboard and form-control actions carried out whole, inside the browser, with human timing (
moveTo,scrollBy,performDrag,dispatchKeystrokes,selectOptions,chooseFiles, ...), and reading what the focused field and the browser's own clipboard hold (readFocusedField,readClipboard,writeClipboard). - Page: one-call page perception (
captureAgentSnapshot), the text a page draws into its 2D canvases (agentCanvasText), element handles that work across frames (resolveAgentNode,agentHitCheck,agentNodesAlive), live-region and layer reports (agentAnnouncements,agentReport), waiting for a page to settle (agentSettle), history steps that answer when landed (agentNavigateToHistoryEntry), secret fields a redacted video recording blacks out (agentMarkSecretField), and a shared-memory frame stream (startFrameStream).
- Discovery. The browser lists every custom command, event and type in its protocol JSON at
http://127.0.0.1:<port>/json/protocol, next to the stock ones. Any CDP client that can send a raw method name can call them:CDPSession.send(...)in Puppeteer or Playwright, a raw WebSocket, a CDP wrapper library, or the DevTools front end's protocol monitor. - Release binary and source build. Everything here is in the binary on the Releases page. A browser built from the published patches has every command, event and type listed here. What depends on the fingerprint identity layer, whose source is not published, is marked release binary only below.
- Experimental. Every item here is marked
experimentalin the protocol. Names and fields may change between releases; the protocol JSON of the build you run is the authority. - Which target. The
Browserdomain commands (Browser.agentFetch,Browser.agentFetchCancel,Browser.startRecording,Browser.stopRecording,Browser.recordingMask,Browser.recordingStatus,Browser.startVideoRecording,Browser.setVideoRecordingTarget,Browser.pauseVideoRecording,Browser.resumeVideoRecording,Browser.markVideoRecording,Browser.stopVideoRecording,Browser.videoRecordingStatus) exist only on the browser target: the WebSocket at thewebSocketDebuggerUrlthat/json/versionreports. Sent on a page session they answer with a "method not found" error. TheInputandPagecommands run on a page session: a session attached to a page target (from/json/list, orTarget.attachToTargetwithflatten: true). Elements in out-of-process iframes are handled for you: the commands take the element's backend node id together with the id of the frame whose renderer holds it, and route the call themselves (see "Naming an element" below). - Long-running commands answer once, when done. Most Input and Page commands here carry out a whole action (a move, a click, a scroll, a wait) and reply when it has ended, not when it was dispatched. Each carries a
timeoutMswith a default and a cap, listed per command. A reply'soutcomestring says how the action ended; the possible values are listed per command. - Events.
Input.actionOutcomeis sent to the session whose command armed it.Input.permissionPromptDismissedis sent on the page's session whenever the browser dismisses one of its permission prompts.Browser.recordingEndedis sent on the browser session.Browser.videoRecordingEndedis sent to the session that started the recording. - Platform.
Page.startFrameStream,Page.updateFrameStreamandPage.stopFrameStreamrun on Windows and Linux; the shared memory and the frame event are each platform's own kind (seePage.startFrameStream). - Switches. Some methods depend on command-line switches the browser was started with. Each dependency is noted on the method, and the table at the end of this document collects them.
- Coordinates. Unless a field says otherwise, points and boxes are in CSS pixels of the main frame's viewport (viewport-relative, the same space
Input.dispatchMouseEventtakes). Elements in iframes, cross-origin ones included, are composed into that space. - Naming an element. Two handles exist.
agentNodeIdis a browser-minted integer thatPage.captureAgentSnapshotgives every listed element. It is stable for the element's life in its document, unique across every frame of the page and never reused by another element of any document.Page.resolveAgentNode,Page.agentHitCheckandPage.agentNodesAlivetake it.backendNodeIdwithframeIdnames the element the way its own renderer knows it: the backend node id in the renderer of the frame's local root, and that local root's frame id.Page.resolveAgentNodereturns both (backendNodeId,localRootFrameId); for an element in the page itself the frame id is the main frame's. The Input commands take this form, as doesPage.agentHitCheckwhen noagentNodeIdis given.
- "The hand." Several Input commands move the pointer "as a hand does": the browser plans each movement from a human-movement persona it derives from a seed (
--movement-persona-seed; without it, in the release binary, the fingerprint identity's--fingerprint-seed; otherwise a random seed for each browser run), and the hand picks where on a target it lands, how long it rests before pressing and how long a button stays down.Input.probeMovementPersonaexposes the persona's fields. No planned path leaves the view. - Where the pointer is. The browser keeps the pointer where the last mouse path left it. Each pointer command takes
pointerX/pointerYfor the case where no mouse path has put it anywhere yet. hit,hitKind,reason. When an action is refused because something else would take the press, the reply names what the press would reach inhit: an element astag#idortag.class(then its text when short), with where it is when it belongs to another document ("the page's div#ov" over an element in a frame, "div#panel in another frame"). A cover that is an open layer the element is not in (a listbox, a menu, a dialog) is named by that layer, e.g.listbox "City", as is that layer's veil, the backdrop beside its box, e.g.dialog "Choose a plan";hitKindthen gives the layer's kind (listbox,menu,dialog,alert,popover,picker, orpanelfor a veil's layer with no role).reasoncarries the hit check's verdict inPage.agentHitCheck's words (covered,nothing,otherFrame,noPointer,inert,disabled,hidden). These fields mean the same across the commands below; the verdicts are defined once underPage.agentHitCheck.actionOutcome. Input actions that press, type, pick or drop return aPage.ActionOutcome: what the action led to (navigations of the tab, new tabs, popups refused, a frame asking to print). WithfollowNavigation(defaulttrueon most commands) the reply waits, for at most about 3 s, for a cross-document navigation the action started to end; without it the reply still says what started. Whatever happens later, until the next action arms, comes asInput.actionOutcomeevents carrying the sameactionId.- Arms, reports and settling. Every Input action "arms" a watch on the page from its dispatch; the action's
actionIdnames that arm.Page.agentSettlewaits for the page to go quiet after an arm, andPage.agentReportreads what the action led to on the page (live regions, layers). For an action that is not input (a navigation, a script, a wait),Page.agentSettleArmarms one by hand.
Each command has a heading, a short description of what it does and when to use it, a Parameters list (name, type, required or optional, meaning), a Returns list in the same form, a JSON example request, and, where the protocol makes the shape clear, an example response (the result object). Events and shared types follow the commands of their domain. Enum values, defaults and caps are given exactly as the protocol declares them.
- Browser domain:
agentFetch,agentFetchCancel,startRecording,stopRecording,recordingMask,recordingStatus,startVideoRecording,setVideoRecordingTarget,pauseVideoRecording,resumeVideoRecording,markVideoRecording,stopVideoRecording,videoRecordingStatus; eventsrecordingEnded,videoRecordingEnded; typesAgentFetchRedirect,AgentFetchOutlineItem,AgentFetchLink,VideoRecordingResult. - Input domain:
dispatchMousePath,moveTo,revealElement,scrollBy,performDrag,setInterceptDrags(newcarryparameter),dispatchKeystrokes,readFocusedField,dispatchKeyChord,dispatchPaste,readClipboard,writeClipboard,selectOptions,fillDateTime,pickColor,chooseFiles,probeMovementPersona; eventsactionOutcome,permissionPromptDismissed; typesMousePathPoint,MousePathEnd,MouseWheelNotch,MoveEnd,PlanRect,WheelScroller,DragScroll,SelectOption,NoTypos,FieldReading,KeystrokeStep,KeyChord,KeystrokeEvent,FieldTarget. - Page domain:
captureAgentSnapshot,agentFinishCapture,resolveAgentNode,agentHitCheck,agentMarkSecretField,agentNodesAlive,agentAnnouncements,agentCanvasText,agentSettleArm,agentSettle,agentReport,agentNavigateToHistoryEntry,startFrameStream,updateFrameStream,stopFrameStream; types for snapshots, deltas, layers, live regions, redaction, canvas text, node life, reports, action outcomes and settling. - Switches the custom methods depend on.
All commands in this section are browser target only. Browser.agentFetch, Browser.stopRecording, Browser.startVideoRecording and Browser.stopVideoRecording are asynchronous: their reply comes when the work has finished.
Reads a URL the way a tab would, in a page that is never shown and never appears as a target. An HTML response is rendered, allowed to settle and extracted as Markdown in the renderer; any other response is taken as it is, before anything commits. Giving a method other than GET, a header the caller may set, or a body makes the call an API call: a real fetch() from a document of the URL's origin. The page's own strings in the reply (title, lang, outline, links, facts) are cut on a character boundary: URLs at 8 KiB, any other at 64 KiB. A session runs six calls at once and up to 64 more wait their turn; a call past those is refused with "too many agentFetch calls are waiting". Use it to read a page or call an endpoint without creating, showing or managing a tab.
Parameters:
url: string, required. The URL to read.mode: string, optional.auto(default): render HTML, take anything else as it is.raw: take every response as it is.method: string, optional. The HTTP method. Anything other than GET makes the call an API call.headers: object, optional. Request headers for an API call (header name to value). The browser's own headers (User-Agent, Sec-*, Accept-Language, Cookie, Origin, Referer, ...) cannot be set: they are dropped, and do not make the call an API call.body: string, optional. The API call's request body; makes the call an API call. One larger than 16 MiB is refused ("body is larger than 16 MiB").referrer: string, optional. The API call's document URL; by default the URL's origin.timeoutMs: integer, optional. Time allowed for the whole call, counted from when it starts running (not while it waits its turn); default 30000, from 1000 to 60000.settleMs: integer, optional. How long the page may take to settle: one budget for the documents that replace one another, each given at least 3000 of it, and the whole budget again after a cleared challenge; default 10000, from 500 to 30000.saveTo: string, optional. Absolute path for a body written to a file: a binary one, or text past 8 MiB. Otherwise one is chosen under the profile.links: boolean, optional. Return every link on the page (at most 5000), not only the ones the Markdown carries.fetchId: string, optional. An id forBrowser.agentFetchCancel.
Returns:
outcome: string.ok,challenge,blocked,error,timeoutorcancelled.error: string, optional. The error, when there is one.status: integer, optional. The HTTP status.finalUrl: string, optional. The URL after redirects.redirects: array ofAgentFetchRedirect, optional. One entry per redirect hop.contentType: string, optional.charset: string, optional.headers: object, optional. The final response headers, lowercased;set-cookiecarries the cookie names only.kind: string. What the body is:html,text,json,xml,binaryornone.title: string, optional. The page title.lang: string, optional. The page language.readerable: boolean, optional. Whether the page was judged readable article content.extractor: string, optional. Which extractor producedmarkdown:readability,structural, ornonewhen no Markdown came out.markdown: string, optional. The rendered HTML page as Markdown.outline: array ofAgentFetchOutlineItem, optional. The headings inmarkdown.facts: object, optional.meta,og,twitter,jsonld[]and Readability'sbyline/siteName/...links: array ofAgentFetchLink, optional. The links found.signals: object, optional. Detection inputs for the caller's own classifier.challenge: object, optional. A challenge or block the fetch met:vendor,kind(auto,interactiveorban),rule,evidence[]; for a challenge alsoclearedandwaitedMs; for a block that is a rate limit alsorateLimitedandretryAfter.text: string, optional. A body taken as it is (any body that is not rendered, and every body inrawmode), decoded to UTF-8, up to 8 MiB.savedTo: string, optional. Where a binary body was written.bytes: number, optional. The body size.truncated: boolean, optional. Whether the body was cut.timings: object. Milliseconds from the call:navigate,firstCommit(a page that replaced itself),commit,dcl,settle,extract,fetch(an API call),total; andrestarts.
Example: read a page as Markdown.
{
"method": "Browser.agentFetch",
"params": {
"url": "https://example.com/article",
"links": true,
"timeoutMs": 20000
}
}Example response (abridged):
{
"outcome": "ok",
"status": 200,
"finalUrl": "https://example.com/article",
"redirects": [],
"contentType": "text/html",
"charset": "utf-8",
"kind": "html",
"title": "An article",
"lang": "en",
"readerable": true,
"extractor": "readability",
"markdown": "# An article\n\nFirst paragraph...",
"outline": [{ "level": 1, "text": "An article", "offset": 0 }],
"links": [
{ "url": "https://example.com/", "text": "Home", "region": "nav", "inMarkdown": false }
],
"timings": { "navigate": 12, "commit": 210, "dcl": 380, "settle": 900, "extract": 920, "total": 925, "restarts": 0 }
}Example: an API call (a POST with a header and a body).
{
"method": "Browser.agentFetch",
"params": {
"url": "https://api.example.com/v1/items",
"method": "POST",
"headers": { "Content-Type": "application/json" },
"body": "{\"name\":\"x\"}",
"referrer": "https://api.example.com/app",
"fetchId": "items-1"
}
}Ends a running or queued Browser.agentFetch with outcome cancelled. The fetch is named by the fetchId the caller gave it.
Parameters:
fetchId: string, required. ThefetchIdpassed toBrowser.agentFetch.
Returns:
cancelled: boolean. Whether a fetch of that id was found and cancelled.
{
"method": "Browser.agentFetchCancel",
"params": { "fetchId": "items-1" }
}{ "cancelled": true }Records every load and websocket this browser carries, in every process, into a directory: recording.har with the headers and the bodies, requests.txt as a grep index, bodies/ for anything large, sockets.ndjson for websocket events, pages.json, at the full level scripts/ with scripts.json, and summary.md to read first. The browser reports from points inside itself, so nothing about how a page loads changes and no page can see the recording. One recording at a time; it also ends itself at the time limit or the size cap (see Browser.recordingEnded).
Parameters:
level: string, required.network: every request and response, with headers, cookies, timings and bodies.full: the same, plus every script every renderer compiled while recording,evalandnew Functioncode included, underscripts/(one file per distinct text, secrets masked) withscripts.jsonsaying which document in which frame compiled which. A script compiled before the recording began is not replayed; the page's own worlds are recorded and isolated worlds are not. A classic script compiled with no name (what DevTools or a tool evaluates in the page, and a page's ownsetTimeoutstring orjavascript:URL) is kept under kindnameless, apart from the page's named code.path: string, optional. An absolute directory, which the browser creates. Without one, a fresh directory under the profile.minutes: integer, optional. The recording ends itself after this many minutes; default 15, at most 120.mask: object, optional. Values to hide from the files, as label to value. Matched exactly, in plain, percent-encoded, JSON-escaped (asJSON.stringifywrites it inside a string) and base64 form; a value under six characters is named in the summary instead of masked.maxTextBodyBytes: integer, optional. Per-entry limit on a text body; default 4194304.maxBinaryBodyBytes: integer, optional. Per-entry limit on a binary body; default 524288.maxFrameBytes: integer, optional. Per-entry limit on a websocket frame; default 65536.maxTotalBytes: integer, optional. The body and frame bytes a recording takes in before it ends itself atsizeCap(headers and the files' own overhead are not counted); default 1073741824.
Returns:
recordingId: string. The id to pass tostopRecordingandrecordingMask.path: string. The directory being written.endsAt: number. When the time limit will end it, in ms since the epoch; 0 without one.
{
"method": "Browser.startRecording",
"params": {
"level": "full",
"path": "C:\\captures\\session-42",
"minutes": 30,
"mask": { "session token": "eyJhbGciOi..." }
}
}{
"recordingId": "r-1",
"path": "C:\\captures\\session-42",
"endsAt": 1761650000000
}Ends the recording and answers once its files are closed. A recording already ending on its own (the time limit, the size cap) is waited for the same way; a second stop while one waits is refused ("that recording is already stopping").
Parameters:
recordingId: string, required. FromstartRecording.
Returns:
path: string. The recording's directory.entries: number. Entries recorded.scripts: number. Script reports taken in, at thefulllevel; 0 otherwise.bytes: number. Bytes taken in.summary: string. One line: the entries, the scripts at the full level, the bytes and what ended it.summary.mdin the directory carries the whole account.
{
"method": "Browser.stopRecording",
"params": { "recordingId": "r-1" }
}Adds values for the running recording to hide from here on, as label to value. Use it when a secret becomes known after the recording started (a token issued mid-session). Matching follows startRecording's mask rules.
Parameters:
recordingId: string, required.values: object, required. Label to value.
Returns:
applied: boolean. Whether the mask was applied to the recording.
{
"method": "Browser.recordingMask",
"params": {
"recordingId": "r-1",
"values": { "api key": "sk-live-..." }
}
}Describes the recording in progress. Without one, recording is false and the other fields are empty or zero.
Parameters: none.
Returns:
recording: boolean.recordingId: string.level: string.networkorfull.path: string.entries: number.scripts: number.bytes: number.endsAt: number. In ms since the epoch; 0 without a time limit.
{
"method": "Browser.recordingStatus"
}{
"recording": true,
"recordingId": "r-1",
"level": "full",
"path": "C:\\captures\\session-42",
"entries": 412,
"scripts": 37,
"bytes": 18231044,
"endsAt": 1761650000000
}Sent when a recording ended. reason is stopped, timeLimit, sizeCap, networkServiceGone, shutdown or error; every one but stopped is news to whoever started it, since the recording ended itself.
Parameters:
recordingId: string.reason: string.stopped,timeLimit,sizeCap,networkServiceGone,shutdownorerror.path: string. The recording's directory.summary: string. The one-line summary, asstopRecordingreturns it.
{
"method": "Browser.recordingEnded",
"params": {
"recordingId": "r-1",
"reason": "timeLimit",
"path": "C:\\captures\\session-42",
"summary": "1203 entries, 61 scripts, 54 MB; ended at the time limit"
}
}Records one tab to an H.264 MP4 at a constant frame rate. The tab is captured at a fixed size without touching its window, so the page sees nothing; the frames are paced and muxed in a sandboxed process, which encodes them itself or with the GPU process's encoder, and the file is written as fragments of about a second, so a file cut short still plays up to its last complete one. An events sidecar is written beside the file. One recording at a time in the browser; it ends itself at the time limit, when the tab it shows closes (unless a move left another tab that is still open: see setVideoRecordingTarget), and when the session that started it detaches. A hardware encoder that fails mid-recording ends it with reason error, as any encoder failure does. A recording that ends without a stop is reported with Browser.videoRecordingEnded. A start that has not answered after 20 seconds fails. The client must be allowed to write local files.
Parameters:
targetId:Target.TargetID, required. The tab to record: a page target.path: string, required. Absolute path of the.mp4to write; its directory is created. The events sidecar is written beside it, as<path without .mp4>.events.ndjson. Neither may exist yet: a recording never replaces a file.fps: integer, required. Frames per second of the file, 1-60. The file holds exactly this rate: a still page repeats its last frame.width,height: integer, optional. The file's size in pixels, clamped to the page's size (no upscaling) and rounded down to even numbers; a page of another shape is letterboxed in black. Without them, the page's own size when the recording starts. With one of them, the other follows the page's shape. The answer'swidthandheightgive the size used.bitrateKbps: integer, optional. Target bitrate, 100-100000; default from the size and rate (about 0.1 bit per pixel per frame, 2-20 Mbps).maxMinutes: integer, optional. The recording ends itself after this many minutes of recorded time (time paused does not count); default 10, at most 120.encoder: enum, optional. Which H.264 encoder:auto(the default) uses the GPU's hardware encoder when one starts and passes its self-test, else OpenH264;hardwarefails the start instead of falling back;softwarealways uses OpenH264.cursor: boolean, optional. Draws the browser's synthetic mouse cursor (the pointer that mouse input to the page moves: CDP input and, in a window, the person's own mouse) and its click mark into the frames; default true. It appears once input has placed it; the system's own cursor image is never recorded. With it, each mouse press writes aclickline to the sidecar, with the file's time astand the point in the file's pixels asxandy(outside the frame for a point off the page). The sidecar's start line says"cursor": trueorfalse.audio: boolean, optional. Records the tab's sound into the file, 48 kHz stereo; default true. AAC when Windows' encoder is available, else Opus. The sound is the tab the file shows: after a move, the new tab's from the moment the move took effect. Sound captured while paused is left out. A browser started with--mute-audiostill records the tab's sound. Speech synthesis and protected (DRM) playback are not captured: they do not pass through the browser's audio service. The sidecar's start line says"audio":aac,opusornone; if the sound fails, anaudioLostline says when, and the file goes on without it.audioCodec: enum, optional. Which audio codec:auto(the default) uses AAC through the GPU process's encoder when one starts and passes its self-test, else Opus, else records no sound;aacoropusfails the start instead of falling back.redact: boolean, optional. Whether the recording is redacted; default false. When it is, card number and security code fields, and every element marked withPage.agentMarkSecretField, are each one black box with nothing in it drawn, in the page while it runs: in the file, in screenshots and in the viewer alike. Text elsewhere is not hidden, a secret a page prints as text included. A part of the page that has not confirmed it is drawn that way is black in the file. The sidecar's start line says"redacted": trueorfalse; a redacted recording's start and target lines carry no"url", since a page's address can hold a secret.
Returns:
recordingId: string. The id to pass to the other video recording commands.width,height: integer. The file's size in pixels.encoder: string.hardware: the GPU's H.264 encoder (High profile);software: OpenH264 (Baseline). One encoder runs for the whole file.audio: string.aac,opusornone: the codec of the file's sound (nonewhen it was turned off or no audio encoder started).redacted: boolean. Whether the recording is redacted (redactwas true).eventsPath: string. The events sidecar.endsAt: number. When the time limit ends it if it is never paused, in ms since the epoch: a pause stops the limit's clock (videoRecordingStatusgives the exact time left).
{
"method": "Browser.startVideoRecording",
"params": {
"targetId": "A1F0C3...",
"path": "C:\\captures\\checkout.mp4",
"fps": 30,
"width": 1280,
"redact": true
}
}{
"recordingId": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7c1e9f30",
"width": 1280,
"height": 720,
"encoder": "hardware",
"audio": "aac",
"redacted": true,
"eventsPath": "C:\\captures\\checkout.events.ndjson",
"endsAt": 1761650600000
}Moves the recording to another tab. The file keeps its size (letterboxed); the old tab is recorded until the new one delivers a frame, or for a second. Success means the move began: the sidecar gets a target line when it takes effect, or a targetFailed line when the new tab fails or closes meanwhile and the old one goes on. An unknown target is refused and the old tab keeps recording; the tab already recorded cancels a move under way. When the tab moved to closes later and the tab this move left is still open, the recording goes back to it the same way, and the target line says "returned": true; if that tab fails or closes meanwhile, or none is open, the recording ends with targetClosed.
Parameters:
recordingId: string, required. FromstartVideoRecording.targetId:Target.TargetID, required. The tab to move to: a page target.
Returns: nothing.
{
"method": "Browser.setVideoRecordingTarget",
"params": { "recordingId": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7c1e9f30", "targetId": "C47B90..." }
}Pauses the recording; the file's time holds until it resumes, so the file has no gap.
Parameters:
recordingId: string, required.label: string, optional. Written to the sidecar's pause line.
Returns:
mediaTimeMs: number. The file's own time: what a player shows at this point.
{
"method": "Browser.pauseVideoRecording",
"params": { "recordingId": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7c1e9f30", "label": "waiting for a code" }
}{ "mediaTimeMs": 48233 }Resumes a paused recording.
Parameters:
recordingId: string, required.label: string, optional. Written to the sidecar's resume line.
Returns:
mediaTimeMs: number. The file's own time: what a player shows at this point.
{
"method": "Browser.resumeVideoRecording",
"params": { "recordingId": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7c1e9f30" }
}Writes one line to the events sidecar.
Parameters:
recordingId: string, required.event: string, required. A JSON object (as text, at most 16 KB): written to the sidecar as one line, with the file's time added astandtypeset tomarkunless it has one. Atypemust be a string, and not one of the recorder's own:start,end,pause,resume,target,targetFailed,click,audioLost.
Returns:
mediaTimeMs: number. The file's time the line was given ast.
{
"method": "Browser.markVideoRecording",
"params": {
"recordingId": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7c1e9f30",
"event": "{\"step\":\"payment form\"}"
}
}{ "mediaTimeMs": 61870 }Ends the recording and answers once the file is closed. A recording already ending on its own is waited for the same way; a second stop while one waits is refused.
Parameters:
recordingId: string, required. FromstartVideoRecording.
Returns:
result:VideoRecordingResult. What the recording left behind, and how it ended.
{
"method": "Browser.stopVideoRecording",
"params": { "recordingId": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7c1e9f30" }
}{
"result": {
"path": "C:\\captures\\checkout.mp4",
"eventsPath": "C:\\captures\\checkout.events.ndjson",
"durationMs": 125400,
"frames": 3762,
"repeated": 2910,
"dropped": 0,
"bytes": 21733120,
"width": 1280,
"height": 720,
"fps": 30,
"encoder": "hardware",
"audio": "aac",
"audioDurationMs": 125400,
"redacted": true,
"reason": "stopped"
}
}The browser's video recording, whoever started it. Without one, recording is false and nothing else is given. It changes nothing.
Parameters: none.
Returns:
recording: boolean.recordingId: string, optional.state: enum, optional.starting,recording,pausedorstopping.targetId:Target.TargetID, optional. The tab the file shows now; once a return to the previous tab has begun (seesetVideoRecordingTarget), that tab; while stopping, the tab it showed last.path: string, optional.mediaTimeMs: number, optional. The file's own time so far.frames: integer, optional. Frames of the page taken so far. The file holds exactly its frame rate (a still page's last frame is repeated); its own count is in the stop's result.bytes: number, optional. Bytes of the file the encoder has sent so far.redacted: boolean, optional.remainingMs: number, optional. Recorded time left before the time limit ends it; time paused does not count.
{
"method": "Browser.videoRecordingStatus"
}{
"recording": true,
"recordingId": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7c1e9f30",
"state": "paused",
"targetId": "A1F0C3...",
"path": "C:\\captures\\checkout.mp4",
"mediaTimeMs": 48233,
"frames": 1447,
"bytes": 8126464,
"redacted": true,
"remainingMs": 551767
}Sent when a video recording ended without a stop: the time limit, the tab closing, or an error. Sent to the session that started it.
Parameters:
recordingId: string.result:VideoRecordingResult. AsstopVideoRecordingreturns it;reasonsays what ended it.
{
"method": "Browser.videoRecordingEnded",
"params": {
"recordingId": "3f6c2a9e-8b1d-4c57-9a0e-2d4b7c1e9f30",
"result": {
"path": "C:\\captures\\checkout.mp4",
"eventsPath": "C:\\captures\\checkout.events.ndjson",
"durationMs": 600000,
"frames": 17998,
"repeated": 15310,
"dropped": 2,
"bytes": 96468992,
"width": 1280,
"height": 720,
"fps": 30,
"encoder": "hardware",
"audio": "aac",
"audioDurationMs": 600000,
"redacted": true,
"reason": "timeLimit"
}
}
}One redirect hop of Browser.agentFetch.
url: string. The URL redirected to.status: integer. The redirect's HTTP status.
A heading in Browser.agentFetch's Markdown.
level: integer. 1 to 6.text: string. The heading text.offset: integer. UTF-16 code-unit offset of the heading line inmarkdown.
A link Browser.agentFetch found.
url: string.text: string. The link text.region: string. Where on the page:main,nav,header,footer,asideornone.inMarkdown: boolean. Whethermarkdownalready carries this link.
What a video recording left behind, and how it ended. Returned by stopVideoRecording and carried by videoRecordingEnded.
path: string. The MP4.eventsPath: string. The events sidecar.durationMs: number. The file's length.frames: integer. Samples in the file.repeated: integer. Of them, repeats of a page that had not changed.dropped: integer. Ticks with no sample because the encoder was more than two frames behind, or dropped the frame: the sample before lasts longer instead, so the file still plays at real speed.bytes: number. The file's size.width,height: integer. The file's size in pixels.fps: integer. Its frame rate.encoder: string.hardware: the GPU's H.264 encoder (High profile);software: OpenH264 (Baseline).audio: string.aac,opusornone: the codec of the file's sound;nonewhen the file got no sound, whateverstartVideoRecordinganswered.audioDurationMs: number. The sound's length, at mostdurationMs: shorter when the sound failed on the way (the sidecar'saudioLostline).redacted: boolean. Whether the recording was redacted (startVideoRecording'sredact).reason: string.stopped,timeLimit,targetClosed,sessionClosedorerror(a capture or encoder failure, a failed write, or an encoder sending more than its bitrate allows).error: string, optional. What failed, with reasonerror.
The Input commands run on a page session. Every command below except Input.probeMovementPersona and Input.setInterceptDrags is asynchronous: it answers once the action has ended. The pointer commands (moveTo, revealElement, scrollBy, performDrag, selectOptions, fillDateTime, pickColor, chooseFiles) share the conventions listed at the top of this document: the hand, the pointer's position, hit/hitKind/reason, and actionOutcome. The common parameters are:
intent:default,confirm,navigate,casualorprecise. Given tomoveToand, "asInput.moveTo's", to the commands that move the hand on their way to a control.speedMultiplier: divides the hand's movement times (default 1).pointerX,pointerY: where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere yet.followNavigation: whether the answer waits for a cross-document navigation the action started to end (at most about 3 s).timeoutMs: how long the action may take; the default and range differ per command.
Dispatches mouseMoved events along a path at a polling rate, as a synthetic gesture targeted at the frame under each point, then optionally turns the wheel and presses, releases or clicks at the last point in the same gesture. One call replaces N per-segment Input.dispatchMouseEvent round-trips: the browser dispatches the events at a fixed interval of 1000 / pollingRateHz ms, so polling rates of 500-1000 Hz are reachable. Use it when the client plans the trajectory itself; use Input.moveTo to let the browser's hand plan it.
Parameters:
path: array ofMousePathPoint, required. Positions to move through in sequence, in CSS pixels of the main frame's viewport.pollingRateHz: integer, required. Hardware polling rate in Hz (e.g. 125, 500, 1000). Events are dispatched at a fixed interval of1000 / pollingRateHzmilliseconds.button:MouseButton, optional. The button held for the duration of the path (defaultnone). Without a held button the moves are hovers: no drag starts and no pointer capture is granted, so a native control stays where the press landed. Set it to drag along the path.modifiers: integer, optional. Keys held along the path and through its end: Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default 0).end:MousePathEnd, optional. A press, a release or clicks at the last point, in the same gesture as the moves, so they take the same route real input takes.wheel: array ofMouseWheelNotch, optional. Wheel turns at the last point, after the moves and before the end: each a real notch (100 px, one tick), phased and latched by the browser as a real wheel is. A held button is held through them.followNavigation: boolean, optional. With anend: whether the answer waits for a cross-document navigation it started to end (at most about 3 s; default true).
Returns:
actionOutcome:Page.ActionOutcome, optional. What the end led to; present only with anend.
Example: move along a path, then click at the last point.
{
"method": "Input.dispatchMousePath",
"params": {
"path": [{ "x": 100, "y": 100 }, { "x": 105, "y": 102 }, { "x": 110, "y": 105 }],
"pollingRateHz": 500,
"end": { "action": "click", "button": "left", "delayMs": 80, "holdMs": 60 }
}
}Example: drag with the left button held, then two wheel notches down at the end.
{
"method": "Input.dispatchMousePath",
"params": {
"path": [{ "x": 300, "y": 400 }, { "x": 320, "y": 405 }, { "x": 360, "y": 410 }],
"pollingRateHz": 250,
"button": "left",
"wheel": [{ "notchesY": 1 }, { "notchesY": 1, "delayMs": 120 }]
}
}Moves the pointer as the hand does (the browser's movement persona): to an element, a box or a point, and on arrival optionally presses, releases or clicks. The hand picks where on an element or box it lands, how long it rests before pressing and how long the button stays down. An element's press is hit-checked first, as a real press would be routed: when something else would take it, nothing is pressed and the answer says what. No path leaves the view. It answers once the move (and the end) is done. This is the usual way to click an element found by Page.captureAgentSnapshot.
Parameters:
backendNodeId: integer, optional. An element: its backend node id, asPage.resolveAgentNodegives it. Goes withframeId.frameId: string, optional. The element's local root frame, asPage.resolveAgentNode'slocalRootFrameIdgives it.aimX,aimY: number, optional. With an element or a box: where on its visible part to land, as fractions across it; absent, the hand's own pick.box:PlanRect, optional. A box, in CSS pixels of the main frame's viewport: the hand picks a point inside it.x,y: number, optional. A point, in CSS pixels of the main frame's viewport.intent: string, optional.default,confirm,navigate,casualorprecise.end:MoveEnd, optional. What the hand does on arrival. With no target, it is done where the pointer is.modifiers: integer, optional. Modifier keys held through the move and the end (Alt=1, Ctrl=2, Meta/Command=4, Shift=8).speedMultiplier: number, optional.check: boolean, optional. With an element and a press or click: hit-check it before pressing (default true).timeoutMs: number, optional. How long it may take, in ms (default 15000, 1000-60000).pointerX,pointerY: number, optional. Where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere yet.followNavigation: boolean, optional. With a press, release or click: whether the answer waits for a cross-document navigation it started to end (at most about 3 s; default true). Without, the answer still says what started.
Returns:
outcome: string. One of:arrived,pressed,released,clicked: the move, and the end asked for, were done.covered: something else would take the press; nothing was pressed.hidden: none of the element or box shows; reveal it first. WithreasonnotDisplayed: nothing of it is laid out; withreasonvanished: it lost its box while the hand was on its way, as when a menu holding it closed.gone: the element is no longer in the page.unreachable: a point outside the view, an element that will not take a press, or one that kept moving from under the hand.interrupted: other pointer input came first. Once the end is on its way, the answer is what it does.timeout.
x,y: number. Where the pointer is now (or once what is on its way has played), in CSS pixels of the main frame's viewport.hit: string, optional. Forcovered,unreachableorhiddendecided by the hit check: what lies over the point, when it can be named; another document's content is said with where it is ("the page's div#ov", "div#panel in another frame"). A cover in an open layer the element is not in is named by that layer (listbox "City"), as is one on that layer's veil, the backdrop beside its box (dialog "Choose a plan"); its kind is inhitKind. Forpressedorclicked: the part of the element with a control of its own the press landed on, which took it first (a link inside a card), when it did. Forunreachablewith reasoninert: what switched it off, when it can be named, asPage.agentHitCheck'shitsays it.hitKind: string, optional. Forcovered, whenhitnames an open layer the element is not in: that layer's kind:listbox,menu,dialog,alert,popoverorpicker, orpanelfor a veil's layer with no role. Forunreachablewith reasoninert, whenhitnames the modal dialog or full-screen element:dialog,alertorfullscreen.reason: string, optional. Why: the hit check's verdict (covered,nothing,otherFrame,noPointer,inert,disabled,hidden) when it decided;notDisplayedfor an element in the page with nothing of it laid out;vanishedfor one that lost its box while the hand was on its way; else a sentence.corrections: integer. Re-aims after the element moved under the hand.durationMs: number.actionOutcome:Page.ActionOutcome, optional. What the press, release or click led to (navigations of the tab, new tabs, popups refused); present only when the end went out.
Example: click an element resolved from a snapshot.
{
"method": "Input.moveTo",
"params": {
"backendNodeId": 1234,
"frameId": "5B3A2C...",
"end": { "action": "click" },
"intent": "confirm"
}
}Example response:
{
"outcome": "clicked",
"x": 412.6,
"y": 288.1,
"corrections": 0,
"durationMs": 643,
"actionOutcome": {
"actionId": 17,
"handled": true,
"waitedMs": 1290,
"events": [
{ "kind": "navigation", "atMs": 41, "state": "started", "url": "https://example.com/next", "mainFrame": true, "frameId": "5B3A2C..." },
{ "kind": "navigation", "atMs": 1203, "state": "committed", "url": "https://example.com/next", "mainFrame": true, "frameId": "5B3A2C..." }
]
}
}Example: a refused press.
{
"outcome": "covered",
"x": 412.6,
"y": 288.1,
"hit": "dialog \"Choose a plan\"",
"hitKind": "dialog",
"reason": "covered",
"corrections": 0,
"durationMs": 512
}Example: move to a point with no end, or press and hold.
{
"method": "Input.moveTo",
"params": { "x": 640, "y": 360, "intent": "casual" }
}{
"method": "Input.moveTo",
"params": {
"backendNodeId": 1234,
"frameId": "5B3A2C...",
"end": { "action": "press", "button": "left" },
"modifiers": 8
}
}Brings an element into view as a hand does before it reaches for it: the wheel turned where the pointer is (spins of notches, the scroll waited out, the last ones a notch at a time) until the element is clear of the edges of the window and of every box that scrolls it, or as near as the wheel brings it. An element that already shows, and that a press where a hand would land on it reaches, is left where it is. Where the wheel at the pointer would scroll something that does not hold the element, the hand first moves (as Input.moveTo moves it) to a place where it would, at most three times. Use it before Input.moveTo when a target is off-screen or clipped by a scrolling box.
Parameters:
backendNodeId: integer, required. The element's backend node id.frameId: string, required. Its local root frame, asPage.resolveAgentNode'slocalRootFrameIdgives it (the main frame's id for an element in the page itself).aimX,aimY: number, optional. The point on it to bring into view, as fractions of its box (default 0.5).pointerX,pointerY: number, optional. Where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere since the last drag; otherwise it is where the last one left it. Named asInput.moveTonames it.x,y: number, optional, deprecated. The same aspointerXandpointerY, under the names this command alone used;pointerXandpointerYwin when both are given. To be removed in a later release.timeoutMs: number, optional. How long it may take, in ms (default 15000).
Returns:
outcome: string. One of:shown:xandyare where a hand can land on it. An element in no state to be pressed where it shows (inert, as everything outside an open modal is; disabled; or invisible) is also answeredshown, withlandVerdictsaying which.blocked: the wheel brings it no nearer, from where the pointer was nor from where the hand moved to, and it does not show.covered: something lies over every place it could be brought to, or over it where the wheel leaves it.gone.timeout.interrupted: other pointer input, or anotherrevealElement, came first.
x,y: number, optional. The landing point, in CSS pixels of the main frame's viewport.calm: boolean, optional. Withshown: whether that point is clear of every scroller's edges, not merely in view.elementX,elementY,elementWidth,elementHeight: number, optional. The element's box now, in CSS pixels of the main frame's viewport.notches: integer, optional. The wheel notches turned.windowScrolledX,windowScrolledY: number, optional. How far the window scrolled, in CSS px (positive down or right).boxScrolledX,boxScrolledY: number, optional. How far the nearest scrolling box that holds the element scrolled, in CSS px (positive down or right).box: string, optional. That scrolling box.covering: string, optional. Withcovered: what lies over it. A cover in an open layer the element is not in is named by that layer (listbox "City"), as is one on that layer's veil, the backdrop beside its box (dialog "Choose a plan").coveringKind: string, optional. Withcovered, when the last look named an open layer: its kind, asInput.moveTo'shitKind. Not given for what lies over every place the element could be brought to.pointerX,pointerY: number, optional. Where the pointer is now (the hand may have moved to turn the wheel where it scrolls what holds the element), in CSS pixels of the main frame's viewport, when that is known.shows: boolean, optional. Withcovered: whether it shows where it is now (24 px of it each way, or all of it when smaller, inside every box and frame that holds it), so what covers it is on top of it in view.coveredcan be said before any notch, wherever the element is:falsewhen it does not show.boxFirst: boolean, optional. Whether the box (boxScrolledX/Y) scrolled before the window did, so a reply can name them in the order they scrolled; absent when nothing scrolled, or when both did between two readings.landVerdict: string, optional. Withshown: what a press atxandymeets, as the reveal's last look there found it, inPage.agentHitCheck's words:reached,label,covered,noPointer,inert,hidden,disabled,nothingorotherFrame.shownis also answered for an element in no state to be pressed there (which no wheel changes) and, when it is where it should be, for whatever its own document lays over it there: this says which. Absent when no look ran at that landing (an element that does not show, or that the page hides from a frame of another process), or when the answer is a frame element's stage's.landHit: string, optional. WithlandVerdict: what the look met there, described as a hit is.landHitKind: string, optional. WithlandVerdict: the kind of the open layerlandHitis in, asPage.agentHitCheck'shitKind.
{
"method": "Input.revealElement",
"params": { "backendNodeId": 1234, "frameId": "5B3A2C...", "aimY": 0.4 }
}Example response:
{
"outcome": "shown",
"x": 388.2,
"y": 503.7,
"calm": true,
"elementX": 320,
"elementY": 480,
"elementWidth": 140,
"elementHeight": 48,
"notches": 6,
"windowScrolledX": 0,
"windowScrolledY": 600,
"pointerX": 402.5,
"pointerY": 377.9,
"landVerdict": "reached"
}Turns the wheel as a hand does to scroll by about amount CSS px one way: over an element when one is given (the hand first moves onto the part of it that shows, as Input.moveTo moves it, and the landing is checked as a press there would be), else where the pointer is. The scroller is the one the wheel latches there: the innermost box under the pointer with room that way, the box where overscroll-behavior stops the chain, or the window. It makes spins of notches at the pace asked, waits the scroll out, turns the last notches one at a time, until it has moved the amount to the nearest notch or reached its end; never on past its end. Wheel notches only: the pointer moves only when the page brings another box under it, and no modifier rides on them. What the scroll leads to is watched from its first notch. It answers once.
Parameters:
direction: string, required.up,down,leftorright.amount: integer, optional. CSS px (default 400; 1 to 1000000).pace: string, optional.read(default): spins of one to three notches at a reader's pace.flick: longer, quicker spins, for a jump.backendNodeId: integer, optional. An element to scroll over, asPage.resolveAgentNodegives it. Goes withframeId.frameId: string, optional. The element's local root frame.findScroller: boolean, optional. With no element, when nothing under the pointer scrolls that way and the page cannot scroll that way at all: whether the hand moves over the box that can scroll furthest (default true).speedMultiplier: number, optional.timeoutMs: number, optional. How long it may take, in ms (default 30000; 1000 to 120000).pointerX,pointerY: number, optional. Where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere yet.followNavigation: boolean, optional. Whether the answer waits for a cross-document navigation the scroll started to end (at most about 3 s; default false). Without, the answer still says what started.
Returns:
outcome: string. One of:scrolled: it moved.end: already at its end that way; no notch turned.still: the wheel turned and what it latched did not move, though it had room: the page takes the wheel there.none: nothing at the pointer scrolls that way, nor does the page, nor (withfindScroller) any box.hidden: none of the element shows; nothing moved (reasonasInput.moveTo's:notDisplayed,hidden,vanished, or a sentence).covered: a press at the landing would meet something else, named inhit, with the verdict inreason(covered,otherFrame,nothing,inert); no notch turned. Withinert,hitandhitKindare what switched it off, asInput.moveTo's.unreachable: the hand could not get onto the element (it kept moving from under the hand, or the landing could not be hit-tested), said inreason; no notch turned.gone.interrupted: other pointer input came first; the figures say how far it got.timeout: the same.
notches: integer. The wheel notches turned.before,after:WheelScroller, optional. The scroller the wheel turned: before the first notch, and after the last, read once the scroll had run out.pageBefore,pageAfter: number, optional. The main frame's window along the axis, from its visual start, in CSS px, when the scroller is not it and is in the main frame's process.pageFirst: boolean, optional. Whether the page moved before the scroller did; absent when only one moved, or both between two readings.movedOver: string, optional. WithfindScroller: the box the hand moved over.hit: string, optional. See conventions.hitKind: string, optional. Forcovered, whenhitnames an open layer the element is not in: that layer's kind, asInput.moveTo'shitKind.reason: string, optional.scrollerId: integer, optional. The scroller'sDOMNodeIdin its local root (a window's: its document's): with that local root, the key a listing names it by.scrollerAgentNodeId: integer, optional. The scroller as the document's id space holds it, listed by a capture, or the main scroller one named: itsagentNodeId. Absent when it holds none (a window has none); a scroll never mints one. The own window of a frame of another process goes by its frame element's, when a listing listed that element.scrollerLabel: string, optional. The scroller's label, under the same rule.pointerX,pointerY: number. Where the pointer is now, in CSS pixels of the main frame's viewport.durationMs: number.actionOutcome:Page.ActionOutcome, optional. What the scroll led to (navigations of the tab, new tabs, popups refused); present once a notch went out.
{
"method": "Input.scrollBy",
"params": { "direction": "down", "amount": 800, "pace": "flick" }
}Example response:
{
"outcome": "scrolled",
"notches": 8,
"before": { "name": "", "page": true, "position": 0, "raw": 0, "max": 4210, "length": 720 },
"after": { "name": "", "page": true, "position": 800, "raw": 800, "max": 4210, "length": 720 },
"pointerX": 640,
"pointerY": 377.9,
"durationMs": 1470,
"actionOutcome": { "actionId": 18, "handled": true, "waitedMs": 1480, "events": [] }
}Example: scroll inside a pane, over an element.
{
"method": "Input.scrollBy",
"params": {
"direction": "down",
"amount": 300,
"backendNodeId": 2210,
"frameId": "5B3A2C..."
}
}Carries out a drag whole, as a hand does: the pointer goes to what is grabbed, presses, moves, turns the wheel under itself while it moves where a scroll is needed, waits the scroll out, lands on the target, checks it is over it, rests and lets go. The page decides the kind: a native drag (a dragstart not cancelled) is carried with dragovers and dropped; any other with mouse moves with the button held, and released (pointer libraries, sliders). The path is planned from the page: every autoscroll band is crossed quickly, rests happen only where nothing scrolls, and the hand moves as the browser's movement persona does. It answers once, after the drag has ended; a failure ends the drag first (a native one is called off, a pointer one is let go where it was grabbed). Use it for sortable lists, drop zones, sliders and canvas widgets.
Parameters:
grabNodeId: integer, optional. What to grab, as an element: its backend node id, asPage.resolveAgentNodegives it. Goes withgrabFrameId.grabFrameId: string, optional. The grabbed element's local root frame.grabX,grabY: number, optional. What to grab, as a point in CSS pixels of the main frame's viewport. The point is taken in whichever of the page's frames lies under it, as a click there is: a frame of another site or a fenced frame included, not a guest such as a<webview>(what covers the point is then named,covered). The drag stays in that frame's document: a target element or a point to let go outside it is refused asunreachable.grabFractionX,grabFractionY: number, optional. Where on the grabbed element to press, as fractions of its box (default its middle; a range input's thumb).targetNodeId: integer, optional. Where to let go, as an element; goes withtargetFrameId, aimed ataimX/aimYof its box.targetFrameId: string, optional. The target element's local root frame.aimX,aimY: number, optional. Where on the target element to let go, as fractions of its box (default 0.5).slot: enum, optional. For a sortable list: let go over the target's slot as it was before the drag moved anything:on(its middle),before(its first third) orafter(its last third). Defaulton.fractionX,fractionY: number, optional. Where to let go, as a fraction of the grabbed element's box as it is at the release.pointX,pointY: number, optional. Where to let go, as a point in CSS pixels of the main frame's viewport.value: number, optional. Where to let go, for a range input: the value to reach.modifiers: integer, optional. Alt=1, Ctrl=2, Meta/Command=4, Shift=8, held through the drag.pressHoldMs: number, optional. A rest after the press before the hand moves, in ms (0-5000), for a widget that starts a drag only on a long press.pointerX,pointerY: number, optional. Where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere yet.speedMultiplier: number, optional. Divides the hand's movement times (default 1).timeoutMs: number, optional. How long it may take, in ms (default 30000, 1000-120000).followNavigation: boolean, optional. Whether the answer to a drop or a release waits for a cross-document navigation it started to end (at most about 3 s; default true).
Exactly one way of saying where to let go is used: an element (targetNodeId + targetFrameId), a fraction of the grabbed element's box (fractionX/fractionY), a point (pointX/pointY), or a value for a range input.
Returns:
outcome: string.dropped(a native drag dropped on the target),released(a pointer drag let go at the landing),refused(the page would not take the drop:dragleaveanddragendinstead),covered,blocked(the target could not be brought into view: its scroller is at its end, it shows only in an edge zone of a box that will not scroll, or the carry could not reach it;reasonsays which),unreachable,moved(the target kept moving away as the wheel turned, or while it was carried to),missed(the pointer could not be put over the target: something else was there, named inhit, or it could not stay clear of what it had to avoid),gone,timeout,cancelled(the drag ended from outside, or adragstartcame after a pointer carry had begun), orinterrupted(other pointer input came first; right after the press, the release may reach the page as a click).kind: string.native,pointer, ornone(nothing was pressed).reason: string, optional. With any outcome butdroppedandreleased: why, in a sentence naming what and where. Forunreachablebefore any press: the press check's verdict on the grabbed element when it is in no state to be pressed (inert,disabledorhidden) or not rendered where it would be grabbed (nothing). Formissed:inertwhen the target is inert there.x,y: number, optional. Where the pointer let go (or is), in CSS pixels of the main frame's viewport.hit: string, optional. What lies under that point. With reasoninert: what switched it off instead, when it can be named, asPage.agentHitCheck'shit, with its kind inhitKind.hitKind: string, optional. Whenhitnames an open layer the grabbed element (covered) or the target (missed) is not in: that layer's kind, asInput.moveTo'shitKind.reached: boolean, optional. Whether the release point was checked over the target before the button came up.grabIndexBefore,grabIndexAfter: integer, optional. The grabbed element's place among its siblings before and after (1-based).siblingCount: integer, optional. How many siblings there are.list: string, optional. The grabbed element's list.grabText: string, optional. The grabbed element's text.grabMovedX,grabMovedY: number, optional. How far the grabbed element's box moved from the press to after the release, in CSS px (positive right or down): for a free-moving element a pointer drag carried, which has no list place or value to read.slotReached: boolean, optional. Withslot: whether the grabbed element ended on the side of the target asked for, in the list's order.valueBefore,valueAfter: string, optional. The grabbed element's value (oraria-valuenow) before and after.valueReached: number, optional. For a range input asked for avalue: the value the release point gives.hitValueBefore,hitValueAfter: string, optional. The value of what lies under the release point, before and after.fractionXReached,fractionYReached: number, optional. Where across the box let go over (the target's for an element, the grabbed element's for a fraction) the release point lies.scrolled: array ofDragScroll, optional. Every scroller that moved during the drag, net.unexpected: array ofDragScroll, optional. The scrolls the drag did not ask for (a page or a library scrolling on its own, a band the plan did not foresee).notches: integer, optional. The wheel notches turned.putBack: boolean, optional. A pointer drag that was called off was let go where it was grabbed.buttonDown: boolean, optional. A pointer drag ended with its own button still down: its press went out and no release of its own followed it (an Escape still on its way when the answer could wait no longer, or its release not delivered while the page's view lived).Input.moveTorefuses a press or a click untilInput.moveTowithend.actionreleaselets go of it. Absent when the drag left no button of its own down; another call's press is not reported here.Input.disableand a renderer change forget the button: an answer they bring about does not say it.durationMs: number. How long the drag took, in ms.replans: integer, optional. How many times the plan was made again.corrections: integer, optional. How many times the landing was corrected.actionOutcome:Page.ActionOutcome, optional. What the drop or the release led to; present only when it went out.
Example: reorder a sortable list (drop item A after item B).
{
"method": "Input.performDrag",
"params": {
"grabNodeId": 3101,
"grabFrameId": "5B3A2C...",
"targetNodeId": 3104,
"targetFrameId": "5B3A2C...",
"slot": "after"
}
}Example response:
{
"outcome": "dropped",
"kind": "native",
"x": 455.3,
"y": 612.8,
"hit": "li.item \"Task B\"",
"reached": true,
"grabIndexBefore": 1,
"grabIndexAfter": 4,
"siblingCount": 6,
"list": "ul#tasks",
"grabText": "Task A",
"slotReached": true,
"fractionXReached": 0.48,
"fractionYReached": 0.81,
"scrolled": [{ "box": "the page", "dx": 0, "dy": 240 }],
"notches": 3,
"durationMs": 2810,
"replans": 1,
"corrections": 0,
"actionOutcome": { "actionId": 19, "handled": true, "waitedMs": 310, "events": [] }
}Example: set a range input to a value.
{
"method": "Input.performDrag",
"params": { "grabNodeId": 4410, "grabFrameId": "5B3A2C...", "value": 75 }
}Stock Input.setInterceptDrags (which makes the browser report drags as Input.dragIntercepted events instead of starting a system drag) gains one parameter.
Parameters:
enabled: boolean, required. Stock: whether drags are intercepted.carry: boolean, optional. Holds an intercepted drag from the moment it starts, as the system's drag loop does (dragenterwhere it started, then adragoverevery 53-73 ms) untilInput.performDragcarries it on or ends it, or interception is turned off, which calls it off (default: false).
Returns: nothing.
{
"method": "Input.setInterceptDrags",
"params": { "enabled": true, "carry": true }
}Types a string with realistic timing and optional typos and corrections. One call replaces a per-key dispatchKeyEvent loop, so per-key round-trip latency cannot limit the typing rate. Scheduling and dispatch happen in the browser process; the call returns once the full schedule has run. Focus the field first (for example with Input.moveTo and a click); the keys go to whatever has focus.
A call types one string (text) or a burst (steps): strings, Backspaces, pauses and shortcuts in order, played as one hand plays them, on one schedule. Any typing call, chord or paste ends the typing session under way first: the keys it had down come up on the keyboard's next report, and the new call's keys begin after them, its time zero one report later than it would have been (its own timeline and durationMs are not changed by it).
Parameters:
text: string, optional. Text to type. May contain\n(mapped to Enter). Non-ASCII characters are dispatched as text-only key events with no virtual key code. Exactly one oftextandstepsis given.steps: array ofKeystrokeStep, optional. A burst, in place oftext: its steps in order. The schedule is fixed by the seed, the browser's movement persona and whether typos are allowed: the same three give the same keys at the same times (the typos' own choices and the thinking pauses on one build). At most 10000 steps, 100000 characters and Backspaces, and an hour of pauses in all. Refused whiledispatchKeyChord'sphasedownholds modifiers (let them up with itsphaseup; they also come up when the DevTools session that holds them detaches).speedMultiplier: number, optional. Sets the typist's pace, withkeystrokeDelayMin/keystrokeDelayMax(> 0). 1.0 is the typist's own speed; values > 1 type faster, as a faster typist does: the keys overlap more and are held hardly shorter. It stops at about 110 words a minute. The thinking pauses are divided by it. Default 1.0.keystrokeDelayMin,keystrokeDelayMax: integer, optional. The pace, as a range in ms. A browser types as one person does: a typist whose speed (40 to 75 words a minute) and way of holding keys are drawn from the persona seed (the hand's, see "The hand" above). This range's middle over the default's (60 / 260, middle 160) is how much slower that typist types: the defaults leave the typist's own pace.keyHoldMin,keyHoldMax: integer, optional. The same for how long a key is held: the typist's holds (about 100 ms at their middle) are stretched by this range's middle over the default's (65 / 130), by 0.6 to 1.6 at most. A quick typist has the next key down before the last one is up. Shift is a key of its own: it goes down ahead of its letter, and repeats when held alone for the keyboard's repeat delay (500 ms), as any held key does. Every key event waits for the keyboard's next report (every 8 ms).contextAware: boolean, optional. Whether the time between two keys depends on the keys: which hands and fingers press them, and how often the two letters meet ("th" is quicker than "tb"). Without it every pair is timed alike. Default true.thinkingPauseProbability: number, optional. Per-character chance of a "thinking pause" before the keystroke. Default 0 (no pauses).thinkingPauseMin,thinkingPauseMax: integer, optional. The pause's range, in ms.typoProbability: number, optional. Per-character chance of injecting a typo + correction sequence. Default 0 (no typos). Realistic values are around 0.01-0.03.seed: number, optional. RNG seed for the rhythm and the typos. The same seed, parameters, text and persona seed give the same event schedule. Default: a fresh time-derived seed each call. A negative value seeds as its magnitude.followNavigation: boolean, optional. Whether the answer waits for a cross-document navigation the keys started to end (at most about 3 s; default true).readBack: boolean, optional. Whether the answer says what the focused field held before the first key and once the keys were handled and it had held still for 150 ms (at most 300 ms more); default false.noTypos:NoTypos, optional. No typo is made in a field this rule holds for, whatevertypoProbabilitysays. The field the keys start in is read first.dryRun: boolean, optional. Plan the call as it would run now (the field read as it would be) and answerdurationMs,seed,typosAllowedand thetimelineas planned; no key is sent, and a session under way is left alone. Default false.timeline: boolean, optional. AnswerstartEpochMsand every key event as sent. Default false.stopWhenFocusLeaves: boolean, optional. Stop when the focus leaves the field the keys start in (orexpectField), which must be an element. The field is read once more before the first key (time zero is after it, as after the call's own reading), and again on any notice of a focus change in the tab (an element's focus in the frame that has the focus, or another frame taking it). While a reading is on its way the burst holds its keydowns; keyups and repeats keep their times, but for a later press of a key that is down, and a modifier's keyup that a held key is typed under: that modifier stays down for the hold, with no repeats (rare: a notice between a modifier and its key). The same field resumes it (a date field's parts count as their field), and what was held moves on by whole reports (slippedMs); another stops it (stopped:focus). A reading the page is too busy to answer, or one older than the last notice, is made again, the burst held, for up to 3 s from the notice; then it stops. The browser hears of a focus change when the page makes it, but keys sent before then that the page had not handled yet (queued behind a long task) reach the field that has the focus when it handles them:uncertainKeys. Refused when the session has no tab. Default false.expectField:FieldTarget, optional. The call is refused before any key unless this field has focus, read asfieldBeforereads it. A call refused after its field reading (here, or bystopWhenFocusLeaves) has still ended the session under way.typosAllowed: boolean, optional. Whether typos may be made (typoProbability), in place ofnoTypos' reading of the field; a call answers the decision it used.
Returns:
typosCorrected: integer. How many typos were made and then corrected with Backspace. The page saw each wrong character until it was deleted. FordryRun, the typos the plan makes; for a stopped call, those corrected before it stopped.fieldBefore:FieldReading, optional. WithreadBack: the field before the first key.fieldAfter:FieldReading, optional. WithreadBack: the field after the keys. Absent when the keys left the document (an Enter that submitted).actionOutcome:Page.ActionOutcome, optional. What the keys led to.durationMs: number, optional. For a call with any ofsteps,dryRun,timeline,stopWhenFocusLeaves,expectFieldandtyposAllowed: the planned time from time zero (the first planned event, after the field reading) to the end of the last keyup or of a trailing pause, in ms.seed: number, optional. For the same calls: the seed used.typosAllowed: boolean, optional. For the same calls: whether typos were allowed.startEpochMs: number, optional. Withtimeline: time zero as ms since the epoch.timeline: array ofKeystrokeEvent, optional. WithtimelineordryRun: every key event, Shift's own included.stopped: string, optional. A call withsteps,timelineorstopWhenFocusLeavesthat stopped before its end answers success with why:focus(the focus left) orreplaced(a later typing, chord or paste call, an action that types, a renderer change, or the DevTools session detaching; also while its field was still being read, with nothing done). The keys it had down were let up first.stepsDone: integer, optional. Withstopped: the steps wholly done.charsSent: integer, optional. Withstopped: the characters of the step under way whose keys all went out.inTypo: boolean, optional. Withstopped: it stopped inside a typo before its correction.uncertainKeys: array ofKeystrokeEvent, optional. WithstopWhenFocusLeaves, stopped or not: the key events sent before the browser heard of a focus change that the page had not handled yet; they may have reached another field, even when the focus came back and the burst went on (focusResumes).slippedMs: number, optional. WithstopWhenFocusLeaves: how much the holds to read the field moved the rest of the schedule, in ms.focusResumes: integer, optional. WithstopWhenFocusLeaves: how many times a reading after a notice found the focus on the field and the burst went on.
{
"method": "Input.dispatchKeystrokes",
"params": {
"text": "hello world",
"speedMultiplier": 1.2,
"typoProbability": 0.02,
"thinkingPauseProbability": 0.05,
"thinkingPauseMin": 400,
"thinkingPauseMax": 1200,
"readBack": true,
"noTypos": {
"inputTypes": ["password", "email"],
"autocompleteTokens": ["one-time-code", "cc-number"],
"autocompletePrefixes": ["cc-"],
"inputModes": ["numeric"],
"maxLengthAtMost": 6
}
}
}Example response:
{
"typosCorrected": 1,
"fieldBefore": { "kind": "value", "backendNodeId": 812, "frameId": "5B3A2C...", "length": 0, "selected": 0, "readonly": false, "disabled": false, "strict": false },
"fieldAfter": { "kind": "value", "backendNodeId": 812, "frameId": "5B3A2C...", "length": 11, "selected": 0, "readonly": false, "disabled": false, "strict": false },
"actionOutcome": { "actionId": 20, "handled": true, "waitedMs": 2140, "events": [] }
}Example: a burst that types, pauses, takes five characters back, types on and saves, stopping if the focus leaves the field it started in.
{
"method": "Input.dispatchKeystrokes",
"params": {
"steps": [
{ "text": "Dear Ana," },
{ "pauseMs": 900 },
{ "text": "\nthe figures are atached" },
{ "backspaces": 5 },
{ "text": "tached." },
{ "chord": { "modifiers": 2, "key": "s" } }
],
"seed": 7,
"typosAllowed": false,
"stopWhenFocusLeaves": true
}
}Example: plan a call without sending a key, to learn how long it will take.
{
"method": "Input.dispatchKeystrokes",
"params": { "text": "hi", "seed": 7, "typosAllowed": false, "dryRun": true }
}Example response (the times are an illustration; a browser's own typist gives its own):
{
"typosCorrected": 0,
"durationMs": 232,
"seed": 7,
"typosAllowed": false,
"timeline": [
{ "step": 0, "charIndex": 0, "key": "h", "code": "KeyH", "event": "down", "timeMs": 0 },
{ "step": 0, "charIndex": 0, "key": "h", "code": "KeyH", "event": "up", "timeMs": 104 },
{ "step": 0, "charIndex": 1, "key": "i", "code": "KeyI", "event": "down", "timeMs": 136 },
{ "step": 0, "charIndex": 1, "key": "i", "code": "KeyI", "event": "up", "timeMs": 232 }
]
}Reads what the focused field holds, as dispatchKeystrokes' fieldBefore reads it: facts only, never its value. No key is sent, and a typing session under way is left alone. Use it to check where keys would go before typing, or what a field holds after an action that was not typing.
Parameters:
noTypos:NoTypos, optional. AsdispatchKeystrokes'noTypos: the answer'sstrictsays whether the rule holds for the field.
Returns:
field:FieldReading, optional. Absent when the focused frame's renderer did not answer in time.
{
"method": "Input.readFocusedField",
"params": { "noTypos": { "inputTypes": ["password"] } }
}Example response:
{
"field": { "kind": "value", "backendNodeId": 812, "frameId": "5B3A2C...", "length": 11, "selected": 0, "readonly": false, "disabled": false, "strict": false }
}Presses a key chord on the typing session's path: modifiers go down as left-hand keys (Ctrl, Shift, Alt, Meta), then the key with them, then all come up, with a hand's timing. Use it for shortcuts (Ctrl+A, Ctrl+Z, Shift+Tab) and, with phase, to hold modifiers around a mouse click.
Parameters:
modifiers: integer, required. Alt=1, Ctrl=2, Meta/Command=4, Shift=8.key: string, optional. The key pressed with the modifiers: one character, such as"v"or"a", or a key name:Enter,Tab,Backspace,Escape,Delete,Insert,Home,End,PageUp,PageDown,ArrowLeft,ArrowUp,ArrowRight,ArrowDown,F1-F12,Space,CapsLock,NumLock,ScrollLock(the lock itself is the machine's, and does not change). With Shift a character reports its shifted form, and one that only Shift reaches is pressed with Shift. Omit it to press only the modifiers.phase: enum, optional.full(default): everything goes down and comes up.down: only the modifiers go down, and stay down, the last one repeating its keydown as a held key does (after about half a second, then about thirty a second) until the next key input; the call returns once they are down.up: held modifiers come up. A ctrl+click isdown, a mouse click, thenup. Modifiers held bydownstay down until anupnames them: through other typing, and through a navigation that keeps the page's widget (as a held key, its keyup then reaches the new document); they come up when the DevTools session detaches, and a page in another renderer forgets them (nothing is left to let up). A burst (dispatchKeystrokes'steps) is refused while any are held.speedMultiplier: number, optional. Divides the chord's timings (default 1.0; larger is faster).followNavigation: boolean, optional. With a key: whether the answer waits for a cross-document navigation it started to end (at most about 3 s; default true).
Returns:
actionOutcome:Page.ActionOutcome, optional. What a chord with a key led to; none for modifiers alone.
{
"method": "Input.dispatchKeyChord",
"params": { "modifiers": 2, "key": "a" }
}A ctrl+click:
{ "method": "Input.dispatchKeyChord", "params": { "modifiers": 2, "phase": "down" } }
{ "method": "Input.moveTo", "params": { "backendNodeId": 1234, "frameId": "5B3A2C...", "end": { "action": "click" } } }
{ "method": "Input.dispatchKeyChord", "params": { "modifiers": 2, "phase": "up" } }Pastes text the way a person does: puts it on this browser's own clipboard and presses Ctrl+V, so the page sees a trusted paste with the text in its clipboardData. Requires --private-clipboard: the call is refused unless the browser runs with it, since it would otherwise overwrite the machine's clipboard. Use it for long text, or for editors that treat typed and pasted input differently.
Parameters:
text: string, required. The text to paste.speedMultiplier: number, optional. Divides the key timing (default 1.0; larger is faster).followNavigation: boolean, optional. Whether the answer waits for a cross-document navigation the paste started to end (at most about 3 s; default true).readBack: boolean, optional. Whether the answer says what the focused field held before the Ctrl+V and after it: read again until it holds the text and holds still, or for at most 1.5 s, since an editor with a document model of its own applies a paste when it is ready; default false.
Returns:
fieldBefore:FieldReading, optional. WithreadBack: the field before, as fordispatchKeystrokes.fieldAfter:FieldReading, optional. WithreadBack: the field after, withcontainsset.actionOutcome:Page.ActionOutcome, optional. What the paste led to.
{
"method": "Input.dispatchPaste",
"params": { "text": "A long paragraph...", "readBack": true }
}{
"fieldBefore": { "kind": "editor", "backendNodeId": 905, "frameId": "5B3A2C...", "editor": "Monaco", "strict": false },
"fieldAfter": { "kind": "editor", "backendNodeId": 905, "frameId": "5B3A2C...", "editor": "Monaco", "contains": true },
"actionOutcome": { "actionId": 21, "handled": true, "waitedMs": 180, "events": [] }
}Reads this browser's own clipboard as a page's paste would get it, with no paste and the machine's clipboard untouched. Requires --private-clipboard: the call is refused unless the browser runs with it, since it would otherwise read the clipboard of the person at the machine. The clipboard is one for the whole browser: every tab's copies and pastes share it, and sequence tells one content from the next. Use it to read what a page's Copy button or a Ctrl+C put there.
What the text holds depends on what put it there:
dispatchPasteorwriteClipboard: the text given, its line breaks CRLF on Windows and on the Linux build presenting Windows, as given on other builds.- A page's own copy or cut of a selection (Ctrl+C, Ctrl+X, the context menu,
document.execCommand): the selection's text with each non-breaking space as a space, its line breaks CRLF on the Windows build only (LF on the Linux build, even when it presents Windows). - A page's
clipboardData.setData('text/plain', ...)in its copy or cut handler: exactly as the page gave it.
Parameters: none.
Returns:
text: string. What a page's paste handler gets fromclipboardData.getData('text/plain'); empty when the clipboard holds no text.html: string, optional. The HTML, when the clipboard holds HTML: whatgetData('text/html')gets, the whole markup.sequence: string. A token for this content of the clipboard: every write, by any tab or bywriteClipboardanddispatchPaste, gives a new one.
{ "method": "Input.readClipboard" }Example response:
{
"text": "Order 1042\r\nTotal: 18.50",
"html": "<b>Order 1042</b><br>Total: 18.50",
"sequence": "7F3A9C0E5B2D4A61C8E0F1A2B3C4D5E6"
}Sets this browser's own clipboard without pasting, the machine's clipboard untouched: the text with its line breaks as dispatchPaste puts them (CRLF on Windows and on the Linux build presenting Windows), so a write and then Ctrl+V pastes what dispatchPaste would; the HTML as given. Requires --private-clipboard: the call is refused unless the browser runs with it.
Parameters:
text: string, required. The text.html: string, optional. The HTML to put beside it.
Returns:
sequence: string. The new content's token, asreadClipboardgives it.
{
"method": "Input.writeClipboard",
"params": { "text": "Order 1042\nTotal: 18.50" }
}Picks options of a <select> the way a person does, as one action: brings it into view, opens a dropdown with the hand's click, reads the list and moves to the option for as long as a person would, and picks it through the list's own code (the page sees no move while the list is open). In a list box, or a dropdown drawn in the page (appearance: base-select), it clicks the options themselves, with Ctrl held for each after the first in a multiple one; a dropdown whose list does not open is stepped with the keys on the focused select. Each value matches an option by its value, then the text it shows, then "Text (value)"; nothing is touched unless every one matches an enabled option that shows. The pick is the action watched (the opening press is not). It answers once.
Parameters:
backendNodeId: integer, required. The select, asPage.resolveAgentNodegives it.frameId: string, required. Its local root frame.values: array of string, required. One for a dropdown; the exact set for a multiple list box.intent: string, optional. AsInput.moveTo's, for the hand's moves.speedMultiplier: number, optional.timeoutMs: number, optional. How long it may take, in ms (default 15000; 1000 to 60000).pointerX,pointerY: number, optional. Where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere yet.followNavigation: boolean, optional. Whether the answer waits for a cross-document navigation the pick started to end (default true).
Returns:
outcome: string. One of:picked: done. With areason, once all of the pick went out:replaced(the page replaced the select after it) ornavigated(the frame went, its navigation inactionOutcome);selectedis then as the pick made it.already: it showed exactly that; nothing was pressed.missing: a value names no option, or only a disabled or a hidden one.disabled: the select itself is disabled.single: several values for a control that holds one.notSelect: not a select.gone.covered,hidden,unreachable: a press of the hand refused, asInput.moveTo's (hitandreason).keysFailed: the key route failed; seekeysStopped.interrupted:reasonnavigated,inputorreset;optionsGone(an option the pick was to click went from the page, as when anonchangemade the options anew, and the select is still there;selectedis as it is now); orgone(the select went;selectedis as the last reading before that).timeout.
way: string. How it was picked:popup(its native list),popover(a base-select picker),listbox,keys, ornone.whyKeys: string, optional. With waykeys: why the list did not open:windowInactive,tabHiddenornotOpened.keysRoute: string, optional. With waykeys:arrows,homeEnd(Home or End, then arrows) ortypeAhead.keysStopped: string, optional. WithkeysFailed:noFocus,noMove,lostFocusorgone.keysMoved: boolean, optional. WithkeysFailed: whether the keys moved its selection.multiple: boolean. Whether the select allows several options.selected: array ofSelectOption. What is selected now, in list order.deselected: array ofSelectOption. What was selected before and is not now.missing: array of string. Values naming no option.disabledMatches: array of string. Values naming only a disabled option.hidden: array of string. Values naming only a hidden (display: none) option.options: array of string. The first 25 options, as"Text (value)", with" [disabled]"and" [hidden]"marked.optionCount: integer.hit: string, optional. See conventions.hitKind: string, optional. Forcovered, whenhitnames an open layer the select is not in: that layer's kind, asInput.moveTo'shitKind.reason: string, optional.x,y: number. Where the hand is now, in CSS pixels of the main frame's viewport.durationMs: number.actionOutcome:Page.ActionOutcome, optional. What the pick led to (navigations of the tab, new tabs, popups refused); present once the pick, a key or an option's click went out.
{
"method": "Input.selectOptions",
"params": { "backendNodeId": 2710, "frameId": "5B3A2C...", "values": ["CA"] }
}Example response:
{
"outcome": "picked",
"way": "popup",
"multiple": false,
"selected": [{ "index": 5, "text": "California", "value": "CA" }],
"deselected": [{ "index": 0, "text": "Choose a state", "value": "" }],
"missing": [],
"disabledMatches": [],
"hidden": [],
"options": ["Choose a state ()", "Alabama (AL)", "Alaska (AK)", "Arizona (AZ)", "Arkansas (AR)", "California (CA)"],
"optionCount": 51,
"x": 530.4,
"y": 334.9,
"durationMs": 1930,
"actionOutcome": { "actionId": 22, "handled": true, "waitedMs": 240, "events": [] }
}Fills a date or time field (an input of type date, time, datetime-local, month or week, drawn with its parts) as a person does: the value is checked against the field before anything moves, the field is brought into view, its first part is clicked by the hand, each part is typed (its digits, zero-padded; a month by name its number; AM and PM stepped with ArrowUp; ArrowRight, or Tab in a right-to-left field, where focus does not move on by itself) with no typo, never a separator or a space, and the field is read until it holds the value. The parts go in the field's own order. What the fill leads to is watched from the click. It answers once.
Parameters:
backendNodeId: integer, required. The field, asPage.resolveAgentNodegives it.frameId: string, required. Its local root frame.value: string, required. As the field'svalueattribute takes it:2024-05-03(date),14:30or14:30:15(time),2024-05-03T14:30(datetime-local),2024-05(month),2024-W18(week).intent: string, optional. AsInput.moveTo's, for the hand's click.speedMultiplier: number, optional.timeoutMs: number, optional. How long it may take, in ms (default 15000; 1000 to 60000).pointerX,pointerY: number, optional. Where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere yet.followNavigation: boolean, optional. Whether the answer waits for a cross-document navigation the fill started to end (default true).
Returns:
outcome: string. One of:filled: it holds the value.already: it showed it; nothing was pressed.notTemporal: not such a field, or one drawn without parts.disabled,readonly.badValue: not a value of its type;reasongives the form.outOfRange: the field would not take it, nothing pressed:reasonmin,maxorstep;noPart, withpart: it shows no second or millisecond the value has; or a part cannot take its piece:part, andreasonrangeorpinned.covered,hidden,unreachable: the hand's click refused, asInput.moveTo's (hit,hitKind,reason).gone.keysFailed: the keys stopped atpart:reasonnoFocus,notTaken,noAdvanceorlostFocus.changed: its parts were made anew while it was filled.mismatch: every key went out and the field does not hold the value.interrupted:reasonnavigated,input,resetorgone.timeout.
kind: string, optional. The field's type, once read.reason: string, optional.hit: string, optional.hitKind: string, optional.part: string, optional.year,month,day,hour,minute,second,millisecond,ampmorweek.complete: boolean, optional. The field as last read: whether it holds a whole value.badInput: boolean, optional. Whether a part holds a value while the whole is none.rangeUnderflow,rangeOverflow,stepMismatch: boolean, optional. Its validity's range and step flags. The reply never carries the field's value.x,y: number. Where the hand is now, in CSS pixels of the main frame's viewport.durationMs: number.actionOutcome:Page.ActionOutcome, optional. What the fill led to (navigations of the tab, new tabs, popups refused); present once the click went out.
{
"method": "Input.fillDateTime",
"params": { "backendNodeId": 3310, "frameId": "5B3A2C...", "value": "2024-05-03T14:30" }
}{
"outcome": "filled",
"kind": "datetime-local",
"complete": true,
"badInput": false,
"rangeUnderflow": false,
"rangeOverflow": false,
"stepMismatch": false,
"x": 248.0,
"y": 402.5,
"durationMs": 2650,
"actionOutcome": { "actionId": 23, "handled": true, "waitedMs": 190, "events": [] }
}Sets a colour field (an input of type color) as a person does: the field is read before anything moves, brought into view and clicked by the hand; once its picker shows, a pause as a person choosing takes, then the colour is picked in it through the picker's own commit (what a typed hex code and Enter run: one trusted input, then change once the picker has closed), and the field is read until it holds the colour. What the pick leads to is watched from when it goes out. It answers once; a picker it opened and did not pick in is closed with nothing chosen.
Parameters:
backendNodeId: integer, required. The field, asPage.resolveAgentNodegives it.frameId: string, required. Its local root frame.value: string, required. The colour as#rrggbb, either case.intent: string, optional. AsInput.moveTo's, for the hand's click.speedMultiplier: number, optional.timeoutMs: number, optional. How long it may take, in ms (default 15000; 1000 to 60000).pointerX,pointerY: number, optional. Where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere yet.followNavigation: boolean, optional. Whether the answer waits for a cross-document navigation the pick started to end (default true).
Returns:
outcome: string. One of:picked: it holds the colour. Or, when it was not read back after the pick, withreasonreplaced(the page made the field anew),navigated(the tab went on) orunread(other input or the time cut the reading short).already: it held it; nothing was pressed.notColor: not such a field.disabled.covered,hidden,unreachable: the hand's click refused, asInput.moveTo's (hit,hitKind,reason).notOpened: the click went out and no picker showed:reasontabHidden,windowInactiveornotOpened; or it closed before the pick:closed.gone.mismatch: the pick went out and the field does not hold the colour.interrupted:reasonnavigated,input,resetorgone.timeout.
reason: string, optional.hit: string, optional.hitKind: string, optional.x,y: number. Where the hand is now, in CSS pixels of the main frame's viewport.durationMs: number.actionOutcome:Page.ActionOutcome, optional. What the pick led to (navigations of the tab, new tabs, popups refused); present once the pick went out.
{
"method": "Input.pickColor",
"params": { "backendNodeId": 3350, "frameId": "5B3A2C...", "value": "#3366ff" }
}{
"outcome": "picked",
"x": 198.2,
"y": 455.0,
"durationMs": 3120,
"actionOutcome": { "actionId": 24, "handled": true, "waitedMs": 210, "events": [] }
}Chooses files for a file field as a person does. The paths are checked before anything moves: each one absolute, there and readable; one folder for a folder field (webkitdirectory), files for any other; one file for a field that takes one. The element named is clicked by the hand: a file input a press reaches, else its first label that shows, or any element that opens a chooser (a button, a link). The file chooser the page opens from that click is answered with the files after a pause as a person picking them takes (1 to 3 s), through the browser's own answer to a chooser: the page gets read access to them, then input and change. A folder is listed in the browser, files only, as Chrome lists one. The chooser is answered whether the tab shows or not, and in a headless browser. What the choice leads to is watched from the click. It answers once; a chooser it does not answer is cancelled, as a person closing the dialog does (the page gets cancel). Refused when the client lacks local file access, as DOM.setFileInputFiles is.
Parameters:
backendNodeId: integer, required. What opens the chooser, asPage.resolveAgentNodegives it: a file input, its label, or a button or link that opens one.frameId: string, required. Its local root frame.files: array of string, required. Absolute paths: the files, or one folder for a folder field. Each path once: a path named twice is refused.intent: string, optional. AsInput.moveTo's, for the hand's click.speedMultiplier: number, optional.timeoutMs: number, optional. How long it may take, in ms (default 30000; 1000 to 120000).pointerX,pointerY: number, optional. Where the pointer is, in CSS pixels of the main frame's viewport, for when no mouse path has put it anywhere yet.followNavigation: boolean, optional. Whether the answer waits for a cross-document navigation the choice started to end (default true).
Returns:
outcome: string. One of:chosen: the field holds the files, by name, or a folder's as many as were listed. Or, when not read back after the files went to the chooser, withreasondetached(its field is not in the page),replaced(the page made the field anew),navigated(the tab went on) orunread(other input or the time cut the reading short, or the page was too large to find the field in).missing: a path is not there or cannot be read, or (reasonempty) a folder holding no file;pathnames it.notFolder: a folder field given a file (pathnames it); or more than one folder (reasononeFolder;pathnames the second).folder: a file field given a folder (path).single: several files for a field that takes one.disabled.hiddenInput: a file input that shows no box to press (none, one clipped away, or one under 4 px) and no label that does: name the element that opens it instead (seeopener).covered,hidden,unreachable: the hand's click refused, asInput.moveTo's (hit,hitKind,reason). A refused press on the field itself is tried once more on its label that shows.noChooser: the click went out and no chooser opened within 5 s, the life of the click's activation: the page did nothing with it, or used another picker such asshowOpenFilePicker. The click reached the element named, sohitis left out.otherField: the chooser came from another file input than the one named, or from a frame outside the element named's local root (another process), and was cancelled;field,hitandcountare left out.gone.mismatch: the chooser was answered and the field does not hold the files;reasonempty: it holds none, as a page that uploads on change and empties the field leaves it.interrupted:reasonnavigated(also when the chooser's frame went before the files did),input,resetorgone.timeout. Thesingle,notFolderandfolderchecks are made again on the chooser itself when the element named was not the field: the chooser is then cancelled.
reason: string, optional.hit: string, optional.hitKind: string, optional.path: string, optional. The path a refusal is about, as given.field: string, optional. The file input the chooser came from, described as a hit is (none for one not in the page, and forotherField).mode: string, optional. What the field takes:single,multipleorfolder.accept: string, optional. The field'sacceptas it gives it (.png,image/*), or the chooser's accepted types; a person's dialog filters on it.opener: string, optional. WithhiddenInput: the nearest element around the field that shows and listens for a press, which may open it, described as a hit is.pressed: string, optional. What the hand pressed when it was not the element named: the field's label that shows, pressed in the field's place (a field with no box to press, or one whose press was refused), described as a hit is (label "Upload resume").count: integer, optional. How many files the field holds as last read (a folder's files for a folder field).x,y: number. Where the hand is now, in CSS pixels of the main frame's viewport.durationMs: number.actionOutcome:Page.ActionOutcome, optional. What the choice led to (navigations of the tab, new tabs, popups refused); present once the click went out.
{
"method": "Input.chooseFiles",
"params": {
"backendNodeId": 3601,
"frameId": "5B3A2C...",
"files": ["C:\\Users\\me\\Documents\\resume.pdf"]
}
}{
"outcome": "chosen",
"field": "input#resume",
"mode": "single",
"accept": ".pdf,.docx",
"pressed": "label \"Upload resume\"",
"count": 1,
"x": 301.7,
"y": 522.3,
"durationMs": 3480,
"actionOutcome": { "actionId": 25, "handled": true, "waitedMs": 220, "events": [] }
}A test probe of the hand. Answers the human-movement persona the browser derives from a seed, every field: the 31 persona fields in draw order, the approach hesitation's three per-persona parameters and the tremor's harmonics. One seed, one hand: a client that models the same persona can compare its own derivation field for field, so a path planned on either side is one hand. Seeds travel as decimal strings because a protocol integer is 32-bit and a number loses precision above 2^53, while the seed is a full int64. Doubles go out unaltered.
Parameters:
seed: string, optional. The seed, a decimal int64 (default: the browser's own persona seed:--movement-persona-seed; without it, in the release binary, the master--fingerprint-seed; otherwise the random seed this browser run drew).
Returns:
seed: string. The seed the persona was derived from, a decimal int64.- The 31 persona fields, in draw order:
speedFactor,curvatureBias,tremorAmplitude,tremorFrequencyCenter,clickOffsetBiasX,clickOffsetBiasY,pauseMeanMs,pauseLogSd,overshootProbability,idleDriftAmplitude,peakVelocityPosition,fittsA,fittsB,fittsNoise,clickDriftAmplitude,clickHoldMeanMs,clickHoldSdMs,activityDensityThreshold,keyboardToMouseDelayMs,mouseToKeyboardDelayMs,postIdleSlowdownThresholdMs,firstInteractionDelayMs,driftIntervalMs,driftRadius,driftCorrelation,gripShiftIntervalMs,gripShiftSize,scrollMomentumDecay(allnumber),scrollBurstLength(integer),scrollCursorDriftScale(number),pollingRateHz(integer). approachAdjustments: integer. The approach hesitation's number of direction changes.approachAmplitudePx: number. Their amplitude in px.approachNearStopMs: number. The near-stop in ms.tremorX,tremorY: array of number. The tremor generator's harmonics, one axis each: nine values, the three frequencies (Hz), then the three amplitudes (px), then the three phases (radians).tremorBroadbandScale: number. The broadband noise scale, in px.
{
"method": "Input.probeMovementPersona",
"params": { "seed": "8838290034121" }
}Something an action led to after its answer (a navigation's start or end, a new tab, a popup refused) until the next action arms. Sent to the session whose command armed it. Pair it with the actionId of the actionOutcome in that command's reply.
Parameters:
actionId: integer. The action's id, as its answer'sactionOutcomegave it.event:Page.ActionEvent. What happened.
{
"method": "Input.actionOutcome",
"params": {
"actionId": 17,
"event": { "kind": "navigation", "atMs": 3410, "state": "committed", "url": "https://example.com/next", "mainFrame": true, "frameId": "5B3A2C..." }
}
}The browser closed a permission prompt of this page unanswered, as a person closing it would. Requires --dismiss-permission-prompts: that switch makes the browser dismiss each prompt after a random 1-5 s, and this event is sent when it does, whatever action is under way or none.
Parameters:
permissions: array of string. What was asked, by Chrome's names for it:geolocation,notifications,camera_stream,mic_stream,clipboard,file_system, ...origin: string. The origin that asked.crossOrigin: boolean. Whether that origin differs from the top page's: a frame of another origin asked.frameId: string. The frame that asked; the page's main frame when not known.shownMs: number. How long the prompt stood before it was closed, in ms.
{
"method": "Input.permissionPromptDismissed",
"params": {
"permissions": ["notifications"],
"origin": "https://example.com",
"crossOrigin": false,
"frameId": "5B3A2C...",
"shownMs": 2870
}
}A point along a mouse movement path.
x: number. X coordinate relative to the main frame's viewport in CSS pixels.y: number. Y coordinate relative to the main frame's viewport in CSS pixels.
What happens at the end of a mouse path, once the pointer has arrived (Input.dispatchMousePath's end).
action: enum, required.press: the button goes down and stays down.release: a held button comes up.click: down and up,clickCounttimes.button:MouseButton, optional. The button pressed or released (defaultleft).clickCount: integer, optional. Clicks in a row, for actionclick: 2 is a double click (default 1).delayMs: number, optional. The pause from the last move to the first press or release, in milliseconds (default 0).holdMs: number, optional. How long each click's button stays down, in milliseconds (default 0).gapMs: number, optional. The pause from one click's release to the next click's press, in milliseconds (default 0).
One turn of the mouse wheel, at the end of a mouse path.
notchesX: integer, optional. Notches turned sideways: positive scrolls right (default 0).notchesY: integer, optional. Notches turned: positive scrolls down (default 0).delayMs: number, optional. The pause before this turn, in milliseconds (default 0).
What Input.moveTo's hand does on arrival. Unlike MousePathEnd, it carries no timings: the hand picks them.
action: enum, required.press: the button goes down and stays down.release: a held button comes up.click: down and up,clickCounttimes.button:MouseButton, optional. The button (defaultleft).clickCount: integer, optional. Clicks in a row, forclick: 2 is a double click (default 1, at most 3).
A rectangle, Input.moveTo's box: in CSS pixels of the main frame's viewport.
x,y,width,height: number.
One scroller along Input.scrollBy's axis.
name: string. Named as covers are (tag#idortag.class, then its text when short); empty for the main frame's window. A frame's window is named by its frame element; a frame of another process's by that element's role (Iframe) when a listing listed it, else empty.page: boolean. Whether it is the main frame's window.position: number. Along the axis, in CSS px, from its visual start (a reversed box counts from where it begins on screen). Distances are taken from this.raw: number. Along the axis, in CSS px, asscrollToporscrollLeftgives it.max: number. As far as it goes, in CSS px.length: number. How long it shows along the axis, in CSS px.
How far a scroller moved during Input.performDrag, net, in CSS px (positive down or right).
box: string."div#L", or"the page".dx,dy: number.
An option of a <select>, in Input.selectOptions' selected and deselected.
index: integer. Its index in the select's list.text: string.value: string.
The rule a typing call gives for fields where a wrong character costs something, so none is made there. A field matches when its input type is one of inputTypes, one of its autocomplete tokens is one of autocompleteTokens or starts with one of autocompletePrefixes, its inputmode is one of inputModes, or its maxlength is 1 to maxLengthAtMost.
inputTypes: array of string, optional.autocompleteTokens: array of string, optional.autocompletePrefixes: array of string, optional.inputModes: array of string, optional.maxLengthAtMost: integer, optional.
What the focused field holds, read by its own renderer: facts only, never its value. Returned by dispatchKeystrokes and dispatchPaste with readBack, and by readFocusedField.
kind: string.value(an input or a textarea),editable(a contenteditable host),editor(the hidden input of a CodeMirror, Ace or Monaco editor),temporal(a date or time field: an input of type date, time, datetime-local, month or week, whichever of its parts has focus),other(focus is on something that holds no text),none(nothing but the page has focus).backendNodeId: integer, optional. The field, asPage.resolveAgentNodenames one: its backend node id in its own frame.frameId:Page.FrameId, optional. That frame.length: integer, optional.valueandeditable: characters it holds.selected: integer, optional.valueandeditable: characters selected in it.readonly,disabled: boolean, optional.valueandtemporal: as the field says.maxLength: integer, optional.value: itsmaxlength, when it has one.editor: string, optional.editor:CodeMirror,AceorMonaco.what: string, optional.other: what has focus, as a refusal names an element (button#save "Save").tag: string, optional.other: its tag.inputType: string, optional.other: an input's type.complete: boolean, optional.temporal: whether it holds a whole value.badInput: boolean, optional.temporal: whether a part holds a value while the whole is none (validity.badInput).part: string, optional.temporal: the part with focus (year,month,day,hour,minute,second,millisecond,ampmorweek). Never a value.strict: boolean, optional. The call'snoTyposrule holds for it: no typo was made in it.contains: boolean, optional.dispatchPaste: the text pasted is in it, line breaks compared as\n; absent when it was not looked for (a field over 2,000,000 characters).moved: boolean, optional. After the call: the field the reading before it found is still in the page and no longer has focus; focus moved on by itself, as a code split across boxes does.
One step of a burst (dispatchKeystrokes' steps): exactly one of its fields.
text: string, optional. Typed asdispatchKeystrokestypestext, typos and thinking pauses included; a typo stays within its step.backspaces: integer, optional. Backspace pressed this many times, as a typist presses it.pauseMs: integer, optional. A pause in ms, from the last key coming up to the next one going down, Shift included, counted from the keyboard report the last keyup went out on (so rounded up to a report, every 8 ms). A leading pause delays the first key; a trailing one ends the burst that long after its last keyup.chord:KeyChord, optional. A shortcut, pressed asdispatchKeyChordpresses one (phasefull), once every key before it is up; the key after it waits for its last modifier to come up.
A shortcut in a burst.
modifiers: integer. Alt=1, Ctrl=2, Meta/Command=4, Shift=8.key: string, optional. AsdispatchKeyChord'skey; omit it for modifiers alone.
A key event of a burst as it was sent, or, for dryRun, as it is planned.
step: integer. The step it belongs to (0 for a call withtext).charIndex: integer, optional. The character of the step it types (atextstep), or which Backspace (abackspacesstep). Absent for a chord's keys and for those of a typo or its correction. A Shift's events carry the character it went down for.typo: boolean, optional. It belongs to a typo or its correction.released: boolean, optional. A key the burst had down when it was stopped, let up then.held: boolean, optional. Sent on its time while the burst held its keydowns for a reading of the field (stopWhenFocusLeaves): a keyup or a repeat, which went to whatever had the focus then.key: string.code: string.event: string.down,up, orrepeat(a held key's keydown again).timeMs: number. In ms from the burst's time zero (startEpochMs): as stamped when sent, or as planned.
A field, as Page.resolveAgentNode names one (dispatchKeystrokes' expectField).
backendNodeId: integer.frameId:Page.FrameId.
The Page commands run on a page session. captureAgentSnapshot, agentNodesAlive, agentAnnouncements, agentReport, resolveAgentNode, agentHitCheck, agentMarkSecretField, agentCanvasText, agentSettle and agentNavigateToHistoryEntry are asynchronous: they answer once every frame has been read, or the wait has ended. A few terms recur:
- Document and listing. A page's document is what the main frame has committed;
documentIdnames its id space (the same after a back/forward cache restore). EverycaptureAgentSnapshotis a listing of that document, named bylistingId; the document's last three listings can serve as the baseline of a delta. - Local root. The frames of one renderer process. A page with out-of-process iframes has several; replies say how many local roots did not answer in time (
unansweredFrames), and a few fields are given in a local root's own coordinates. - Layers. A modal, a drawer, a menu, a popover: something open on top of the page.
captureAgentSnapshotwithscopeonoralllists them bottom to top, and reports judge the stack against the one last read for the document (the baseline stack). - Live regions.
aria-liveregions, rolesalert/status/log, and<output>. The browser keeps what they said around each action.
Captures one agent-perception frame: the interactive elements across all frames (cross-origin iframes and open or closed shadow DOM included), with geometry composed into the root viewport and cross-context occlusion flags, plus an OOPIF-aggregated screenshot. Elements that are in the viewport, interactive and not obscured are marked: they get a short label (a1, a2, ...) and a distinct outline colour drawn on the screenshot, so a caller can name a target unambiguously. A hidden page is brought to the front first (broughtForward); a page frozen by setWebLifecycleState fails at once. Use it instead of an accessibility-tree walk plus per-frame coordinate math.
Parameters:
format: enum, optional. Screenshot compression format:jpeg,pngorwebp(defaults topng).quality: integer, optional. Compression quality 0-100 (jpeg/webponly).offscreenMode: enum, optional. How to report elements outside the root viewport:none(drop them),summary(off-screen, only what can be acted on, is named, or is a progress bar or meter),full(all). Defaults tosummary.includeScreenshot: boolean, optional. Include the screenshot in the response (defaults to true).screenshotMaxPixels: integer, optional. The image's largest area in pixels. It is brought to CSS-pixel resolution, then scaled down to fit; never up. 0 keeps the device resolution. Defaults to 1125000 (about 1.5k model tokens).scope: enum, optional. The layers open on the page (a modal, a drawer, a popover).on: report them, and leave out what a click cannot reach;all: report them, everything listed. Defaults tooff.since: string, optional. AlistingIdfrom this document; the reply then carriesdeltawhen it is one of the document's last three listings, taken with the samescopeandoffscreenMode.holdForSecrets: boolean, optional. The caller holds secrets: the reply carriesredaction, the frozen frame's painted text, and no screenshot;agentFinishCapturegives the image once the caller says what to black out. Without it, card fields and frames that could not be checked are blacked, and the image comes with the reply.marks: boolean, optional.falseleaves the listing's outlines and badges off the image, the page as it is; the listing keeps its labels and colours. Defaults to true.clip:Viewport, optional. A rectangle of the root viewport to keep, in DIPs as the elements' boxes are given (the view's CSS px at zoom 100%); the rest is cut from the full-resolution copy after the redaction and before the scale, in the browser, with nothing changed on the page. The stockPage.Viewporttype'sscaleis ignored. One that meets none of the view withholds the image (clipOutside).
Returns:
url: string. Page URL at capture time.title: string. Page title at capture time.viewport:AgentSnapshotViewport. Viewport and scroll geometry.elements: array ofAgentSnapshotElement. Interactive elements, composed into root-viewport space; at most 1500 (seeelementsCut).screenshot: binary (base64), optional. The OOPIF-aggregated screenshot; present withincludeScreenshot.snapshotToken: string. Cheap change-detection token over the URL, geometry and element identities.layers: array ofAgentLayer, optional. With scopeonorall: the layers open on the page, bottom to top.hidden: array ofAgentHiddenGroup, optional. With scopeon: what was left out, by what it is behind.listingId: string. Names this listing; usable as a later capture'ssince.documentId: string. Names the document's id space (the same after a back/forward cache restore).baseline: boolean, optional. Present whensincewas given: whether it matched.delta:AgentSnapshotDelta, optional. What changed since the listing named bysince.regions: array ofAgentLiveRegion. The live regions with text now.heard: array ofAgentHeard. What the regions said since the last action.unansweredFrames: integer. Local roots that gave no answer.redaction:AgentRedaction, optional. WithholdForSecretsand an image: what the frozen frame drew of text, foragentFinishCapture's answer.screenshotWithheld: enum, optional. Why there is no screenshot this time.pageTooLarge: the text of the page's own frame that is searched (what can show, and the text around it) passed what is searched while secrets are held, or the walk past it ran out of time.mainFrameNotFrozen: its frame could not be held still for the copy in the tries the capture had time for.inputDuringCopy: input that moves the drawing came during the last of them.captureExpired: the capture was not finished in time.blank: the page isabout:blankwith nothing in it.clipOutside: the clip asked for met none of the view.framesBlacked: integer, optional. Frames painted solid in the screenshot, as they could not be checked; absent for none.scroller:AgentSnapshotScroller, optional. The page's main scroller; absent when nothing scrolls, or whenlockedBehindLayersays why.lockedBehindLayer: integer, optional. With layers: a blocking layer is on top and nothing inside it scrolls: its index intolayers.scrolleris then absent;viewport's scroll fields stay the document's.documentLocked: boolean, optional. The page's document is scroll locked:overflowhidden or clip on<html>or<body>, or either fixed on a window that cannot scroll. Absent when it is not.broughtForward: boolean, optional. The page was hidden, and was brought to the front for the capture; absent when it was not.elementsCut: integer, optional. Interactive elements left out past the 1500 a capture composes (the rest of the listing's order); absent when none were.
{
"method": "Page.captureAgentSnapshot",
"params": { "format": "webp", "quality": 80, "offscreenMode": "summary", "scope": "on" }
}Example response (abridged):
{
"url": "https://example.com/checkout",
"title": "Checkout",
"viewport": { "width": 1280, "height": 720, "deviceScaleFactor": 1, "scrollX": 0, "scrollY": 0, "scrollWidth": 1280, "scrollHeight": 2140, "screenshotScale": 1 },
"elements": [
{
"backendNodeId": 812, "agentNodeId": 41, "frameId": "5B3A2C...", "role": "textbox", "name": "Email", "value": "",
"tag": "input", "interactive": true, "interactiveReason": "form-control",
"states": ["visible", "enabled", "focusable", "editable", "required"],
"x": 320, "y": 180, "width": 400, "height": 40, "inViewport": true, "obscured": false,
"label": "a1", "marked": true, "color": "red", "reads": "Email"
},
{
"backendNodeId": 1234, "agentNodeId": 42, "frameId": "5B3A2C...", "role": "button", "name": "Pay now",
"tag": "button", "interactive": true, "interactiveReason": "role",
"states": ["visible", "enabled", "focusable"],
"x": 320, "y": 640, "width": 160, "height": 48, "inViewport": true, "obscured": false,
"label": "a2", "marked": true, "color": "blue", "reads": "Pay now"
}
],
"screenshot": "UklGRi4AAABXRUJQ...",
"snapshotToken": "9f2c1a...",
"layers": [],
"hidden": [],
"listingId": "L-7",
"documentId": "D-3",
"regions": [],
"heard": [],
"unansweredFrames": 0,
"scroller": { "positionX": 0, "positionY": 0, "maxX": 0, "maxY": 1420, "lengthX": 1280, "lengthY": 720, "x": 0, "y": 0, "width": 1280, "height": 720, "isPage": true, "wheelReaches": true }
}Example: a second capture with a delta against the first.
{
"method": "Page.captureAgentSnapshot",
"params": { "offscreenMode": "summary", "scope": "on", "since": "L-7", "includeScreenshot": false }
}{
"url": "https://example.com/checkout",
"title": "Checkout",
"viewport": { "width": 1280, "height": 720, "deviceScaleFactor": 1, "scrollX": 0, "scrollY": 0, "scrollWidth": 1280, "scrollHeight": 2140 },
"elements": [ "..." ],
"snapshotToken": "0b77e4...",
"layers": [
{ "kind": "dialog", "name": "Choose a plan", "head": "Choose a plan. Basic. Pro. Close.", "how": "top-layer", "blocking": true, "nodeId": 77, "frameId": "5B3A2C...", "elementCount": 3, "behindCount": 12 }
],
"hidden": [ { "behind": "Choose a plan", "layer": 0, "inView": 9, "offscreen": 3 } ],
"listingId": "L-8",
"documentId": "D-3",
"baseline": true,
"delta": {
"unchanged": false,
"added": [ { "agentNodeId": 58, "why": "new" }, { "agentNodeId": 59, "why": "new" }, { "agentNodeId": 60, "why": "new" } ],
"removed": [ { "agentNodeId": 42, "label": "a2", "role": "button", "name": "Pay now", "why": "covered", "wasInView": true, "baselineIndex": 1, "behindLayer": 0 } ],
"changed": [],
"reordered": [],
"focus": { "agentNodeId": 58, "label": "a18" },
"layersOpened": [0],
"layersClosed": [],
"announcements": [],
"partial": false
},
"regions": [],
"heard": [],
"unansweredFrames": 0,
"lockedBehindLayer": 0
}Example: hold the image for redaction, then finish it (see agentFinishCapture).
{
"method": "Page.captureAgentSnapshot",
"params": { "holdForSecrets": true, "marks": false }
}Returns a held capture's image (captureAgentSnapshot with holdForSecrets), with the runs and fields the caller found to hold secrets blacked out, then scaled and marked as the capture's would have been. Fails captureExpired for an unknown capture, one over 10 s old, or a page that changed document; frames must answer every frame of the redaction.
Parameters:
captureId: string, required. From the capture'sredaction.captureId.frames: array ofAgentFinishFrame, required. One per entry ofredaction.frames, by index: the runs that show part of a secret, and the fields that hold one.
Returns:
screenshot: binary (base64). The image.screenshotScale: number. Image pixels per CSS pixel.
{
"method": "Page.agentFinishCapture",
"params": {
"captureId": "C-12",
"frames": [
{ "runs": [14, 15], "fields": [2] },
{ "runs": [], "fields": [] }
]
}
}Resolves an agentNodeId of this document to the element's current border box in the root viewport's CSS-pixel space, the same units as AgentSnapshotElement, and to the handle the Input commands take (backendNodeId plus localRootFrameId). Works uniformly for elements in cross-origin frames. Fails "the page did not answer" when the renderer holding the element has not answered within 10 s. Use it to confirm a target has not moved between perception and action without paying for a full re-snapshot, and to turn an agentNodeId into the backendNodeId/frameId pair the Input commands want.
Parameters:
agentNodeId: integer, required. From a priorcaptureAgentSnapshot.
Returns:
found: boolean.falsewhen the id is unknown or the element is gone or not laid out.x,y,width,height: number, optional. The border box now.backendNodeId:DOM.BackendNodeId, optional. The element's backend node id in the renderer that holds it, forDOM.resolveNodeon the session attached tolocalRootFrameId, and for the Input commands'backendNodeId.localRootFrameId:FrameId, optional. Id of the local root frame the element lives under: the main frame's id for in-process frames, the out-of-process iframe's target id otherwise. Names the session that can resolvebackendNodeId, and is the Input commands'frameId.
{
"method": "Page.resolveAgentNode",
"params": { "agentNodeId": 42 }
}{
"found": true,
"x": 320,
"y": 640,
"width": 160,
"height": 48,
"backendNodeId": 1234,
"localRootFrameId": "5B3A2C..."
}Whether a mouse press at a point would reach an element found by captureAgentSnapshot, or one named by its node and frame. The point is routed the way a real press is routed, and the element's own renderer runs the hit test a real press runs; no script runs in the page. Fails "the page did not answer" when no answer has come within 10 s. Use it to check a landing point before pressing, or to learn what covers an element. Input.moveTo runs this check itself before an element's press.
Parameters:
agentNodeId: integer, optional. The element, by anagentNodeIdof this document. Or elsebackendNodeIdwithframeId.x,y: number, required. The point, in CSS pixels of the main frame's viewport, as input events take it.backendNodeId: integer, optional. The element by its backend node id in the renderer offrameId's local root: a selector's match, or a control a form fill found again. A frame element named this way counts a hit in its own frame as one on it, as one named byagentNodeIddoes.frameId: string, optional. The local root frame forbackendNodeId.
Returns:
verdict: string. One of:reached: the press lands on the element or inside it.label: it lands on a<label>for it, which passes the click on.covered: something else is on top.noPointer: the element lets the pointer through (pointer-events: none).inert: the page has switched it off, as everything outside an open modal dialog is (with none, outside a full-screen element), what aninertattribute holds, and a frame's content when its frame element is.hidden: it is not visible.disabled: it is, or sits in, a disabled form control, which swallows the press.nothing: nothing is there to press.otherFrame: content from another frame is on top.gone: it is no longer in the page. For an element in a frame of another process, the page's own content on top iscovered, andhitsays so ("the page's div#ov"); another frame's isotherFrame("div#panel in another frame").
hit: string, optional. What the press would reach instead, when that is not the element. Forreached: the part of it with a control of its own the press lands on (a link inside a card), when it does. A cover in an open layer the element is not in is named by that layer (listbox "City"), as is one on that layer's veil, the backdrop beside its box (dialog "Choose a plan"). Forinert: what switched it off, when it can be named: the modal dialog or full-screen element open outside it, named as its layer is, or the element whoseinertattribute holds it (div#main), with where it is for a frame's content ("the page's div#main").hitKind: string, optional. Whenhitnames an open layer the element is not in: that layer's kind:listbox,menu,dialog,alert,popoverorpicker, orpanelfor a veil's layer with no role. Not given for content of another frame process. Forinert, whenhitnames the modal dialog or full-screen element:dialog,alertorfullscreen.
{
"method": "Page.agentHitCheck",
"params": { "agentNodeId": 42, "x": 400, "y": 664 }
}{ "verdict": "covered", "hit": "dialog \"Choose a plan\"", "hitKind": "dialog" }Tells the browser that an element holds a secret: from this answer on, and for as long as the element lives, a redacted video recording (Browser.startVideoRecording with redact) shows it as one black box of its own size, with nothing in it drawn (no text, no caret), in the file, in screenshots and in the viewer alike; a text field is black whole, its placeholder included, empty or not. Call it before putting the secret in. Nothing about the element changes for the page. It cannot be taken back: a field that later holds something else stays black. A frame element is never marked (mark the field inside the frame), and an element that draws itself (a canvas, an image, a video, a plugin) is not hidden by a mark. When a secret typed into a hidden field is passed on by the page's script to another editable element it focuses, that one is marked too. Fails "the page did not answer" when no answer has come within 10 s.
Parameters:
agentNodeId: integer, optional. The element, by anagentNodeIdof this document. Or elsebackendNodeIdwithframeId; or elsefocused.backendNodeId: integer, optional. The element by its backend node id in the renderer offrameId's local root, asagentHitChecktakes it.frameId: string, optional. The local root frame forbackendNodeId.focused: boolean, optional. With no id: the element that has focus where the next key goes (the focused frame, else the main frame; the innermost focused element, inside shadow trees, a part of a control's own date or time fields being the control), asInput.dispatchKeystrokesfinds it before its first key.
Returns:
outcome: string.marked;gone: the id names no element now;frame: the element is a frame element, and nothing is marked;nothing: withfocused, no element has focus (the document's body or root, or nothing).
{
"method": "Page.agentMarkSecretField",
"params": { "agentNodeId": 41 }
}{ "outcome": "marked" }Marking the focused field, then typing the secret into it:
{ "method": "Page.agentMarkSecretField", "params": { "focused": true } }
{ "method": "Input.dispatchKeystrokes", "params": { "text": "..." } }Whether elements are still in this document, by agentNodeId or label; one answer per id, then per label, in order. No script runs in the page. Use it to validate a set of handles cheaply before acting, or to learn where an element went (off-screen, behind a layer, covered).
Parameters:
agentNodeIds: array of integer, optional.labels: array of string, optional. Labels as a listing gave them (a1,a2, ...).layers: boolean, optional. Also read the page's layer stack (the frames that show a tenth of the view, 300 ms each), so thatbehindOpencan be answered. The stack is not kept as the baseline;agentAnnouncementswithlayers, a report or a capture judge it and keep it.
Returns:
documentId: string.nodes: array ofAgentNodeLife. One per id, then one per label, in order.
{
"method": "Page.agentNodesAlive",
"params": { "agentNodeIds": [41, 42], "labels": ["a7"], "layers": true }
}{
"documentId": "D-3",
"nodes": [
{ "agentNodeId": 41, "label": "a1", "state": "alive", "role": "textbox", "name": "Email", "placement": "view", "rendered": true, "reads": "Email" },
{ "agentNodeId": 42, "label": "a2", "state": "alive", "role": "button", "name": "Pay now", "placement": "behind", "behind": { "kind": "dialog", "name": "Choose a plan", "frameId": "5B3A2C...", "nodeId": 77 }, "rendered": true, "behindOpen": true },
{ "label": "a7", "state": "gone" }
]
}The live regions of every frame, and what they said since the last action. Use it after an action to read toasts, status text and validation messages without parsing the whole page, and, with layers, to judge the layer stack.
Parameters:
layers: boolean, optional. Also read the page's layer stack (the frames that show a tenth of the view, in the same 300 ms, which the answer then waits for), judge it against the stack this document last read, asagentReportdoes, and keep it as the next baseline: a layer told here is a kept one for the next report, its closing animation waited out as any.
Returns:
documentId: string.regions: array ofAgentLiveRegion. The regions with text now.heard: array ofAgentHeard. What they said since the last action.unansweredFrames: integer.layers: array ofAgentLayer, optional. Withlayers: the stack judged, bottom to top; a frame not read keeps its own, neither opened nor closed. Absent when this document had no stack read before (the next report then tells every layer open) or was replaced meanwhile.layersOpened: array of integer, optional. Indices intolayersnot in the baseline stack.layersClosed: array ofAgentLayer, optional. In the baseline stack and not open now, as they were read then.layersReworded: array ofAgentLayerReworded, optional. Kept since the baseline, its head changed.
{
"method": "Page.agentAnnouncements",
"params": { "layers": true }
}{
"documentId": "D-3",
"regions": [
{ "regionId": 3, "frameId": "5B3A2C...", "kind": "status", "assertive": false, "text": "3 results" }
],
"heard": [
{ "key": "r3-2", "region": { "regionId": 3, "frameId": "5B3A2C...", "kind": "status", "assertive": false, "text": "3 results" }, "gone": false, "agoMs": 840, "changes": 2, "replaced": "Searching..." }
],
"unansweredFrames": 0,
"layers": [],
"layersOpened": [],
"layersClosed": [],
"layersReworded": []
}Answers the text and the filled rectangles the page's 2D canvases still show, in every frame of the page (frames of other processes included), read between the page's tasks, the page unaware. Use it for pages that draw their own text into a canvas instead of the DOM (a document editor that paints its pages, a spreadsheet grid): each run comes with its string, its font and colour, and the place of every character boundary in the space Input.moveTo's x and y take, so a caret can be put between two characters or a word selected by pointing.
The text is recorded from the draw calls (fillText, strokeText, the cluster draws, fillRect, clearRect) and resolved by the clip, redraws of the same run, covering clears and opaque fills; what the record cannot follow makes what it crosses inexact rather than wrong. Text and fills drawn under a shadow, a filter, a composite mode other than source-over and copy, or inside a layer are not runs or fills: they are operations not followed. Only a <canvas> element's 2D context is recorded.
Requires --enable-canvas-text-record: recording is off unless the browser runs with it, and without it the call fails, saying so.
Parameters:
backendNodeId: integer, optional. One canvas, withframeId. Both or neither.frameId: string, optional. ThelocalRootFrameIdthat names that canvas (asPage.resolveAgentNodegives it).inView: boolean, optional. Only the runs and fills whose quads meet their canvas'sshownRect, chosen before the caps. Default false.
Returns:
canvases: array ofAgentCanvas. Every<canvas>of the page, or the one named.framesLeftOut: array of string. Local roots that did not answer in time, or whose place in the page could not be found; their canvases are left out.runsCut: integer. Runs left out past the answer's caps: 50,000 runs and 500,000 characters (UTF-16 units) in all, each canvas's newest kept.fillsCut: integer. Fills left out past the answer's cap: 50,000 fills in all, each canvas's newest kept.
An answer for a page that draws much text can be several megabytes; inView keeps it to what shows, and a client whose WebSocket caps a message's size should ask that way or name one canvas.
{
"method": "Page.agentCanvasText",
"params": { "inView": true }
}Example response:
{
"canvases": [
{
"backendNodeId": 57,
"frameId": "5B3A2C...",
"localRootFrameId": "5B3A2C...",
"context": "2d",
"quad": [{ "x": 120, "y": 96 }, { "x": 936, "y": 96 }, { "x": 936, "y": 1152 }, { "x": 120, "y": 1152 }],
"shownRect": { "x": 120, "y": 96, "width": 816, "height": 624 },
"exact": true,
"truncated": false,
"recordBytes": 18432,
"recordPeakBytes": 24576,
"runs": [
{
"text": "Hello",
"font": "14.6667px Arial",
"color": "#000000",
"alpha": 1,
"stroke": false,
"direction": "ltr",
"bidi": false,
"baseline": { "start": { "x": 216, "y": 210 }, "end": { "x": 249.4, "y": 210 } },
"width": 33.4,
"advances": [0, 10.6, 18.8, 22, 25.2, 33.4],
"quad": [{ "x": 216, "y": 196.7 }, { "x": 249.4, "y": 196.7 }, { "x": 249.4, "y": 213.1 }, { "x": 216, "y": 213.1 }],
"exact": true
}
],
"fills": []
}
],
"framesLeftOut": [],
"runsCut": 0,
"fillsCut": 0
}To put the caret after "Hel", take boundary 3: start + (end - start) * advances[3] / width, here x = 216 + 33.4 × 22 / 33.4 = 238, y = 210, and click there with Input.moveTo.
Arms a settle for an action that is not input (a navigation, a script, a wait): call it just before acting, then agentSettle with its armId. Input actions arm their own (their actionId).
Parameters: none.
Returns:
armId: integer. To pass toagentSettleoragentReport.
{ "method": "Page.agentSettleArm" }{ "armId": 31 }Waits until the page has settled after an action (first until until is met, when given) and says what was still changing if it did not. The page counts as settled when, through the quiet window, what the agent reads stayed the same in every frame, no navigation was pending, no request the action caused (or one started after it) was running, and no finite animation with 1.5 s or less to run was running in view. A hidden page is brought to the front first (the report's broughtForward); a page frozen by setWebLifecycleState fails at once. Use it between an action and the next capture instead of a fixed sleep.
Parameters:
armId: integer, optional. An Input action'sactionId, oragentSettleArm'sarmId; absent: armed now. One that is not the current action is an error.until:Until, optional. What to wait for first; any one of its conditions met meets it, and the page settles after it.quietMs: integer, optional. The quiet window in ms: default 150 (0 to 5000).capMs: integer, optional. The cap in ms: default 1500 (0 to 30000). A main-frame commit during the settle restarts the cap, once.timeoutMs: number, optional. How longuntilis waited for, from the call, in ms: default 10000, at most 60000.report: boolean, optional. Also return the action's report (actionReport), each frame's part read once it has settled; none once another action armed. A frame's part may take 400 ms past its settle: one later still counts as a frame that did not answer.controls: boolean, optional. Withreport, the report also carries the page's control census (controls).
Returns:
settle:SettleReport.untilSeen: boolean, optional. Present whenuntilwas given: whether it was met.untilAfterMs: number, optional. From the action to whenuntilwas met, in ms.actionReport:AgentActionReport, optional. Withreport.
{
"method": "Page.agentSettle",
"params": {
"armId": 17,
"until": { "text": "Order confirmed" },
"quietMs": 200,
"capMs": 3000,
"report": true
}
}{
"settle": { "settled": true, "afterMs": 1320, "stillChanging": [], "shownChange": 14, "domChanged": true },
"untilSeen": true,
"untilAfterMs": 1180,
"actionReport": {
"documentId": "D-4",
"armId": 17,
"regions": [{ "regionId": 1, "frameId": "5B3A2C...", "kind": "status", "assertive": false, "text": "Order confirmed" }],
"heard": [{ "key": "r1-1", "region": { "regionId": 1, "frameId": "5B3A2C...", "kind": "status", "assertive": false, "text": "Order confirmed" }, "gone": false, "agoMs": 140 }],
"layers": [],
"layersOpened": [],
"layersClosed": [],
"layersReworded": [],
"navigated": true,
"unansweredFrames": 0
}
}Example: wait for a selector to appear, in a given frame, without a prior action.
{
"method": "Page.agentSettle",
"params": {
"until": { "selector": "#results .row", "state": "visible", "frameId": "5B3A2C..." },
"timeoutMs": 15000
}
}Example: a settle that did not finish.
{
"settle": {
"settled": false,
"afterMs": 1500,
"stillChanging": [
{ "kind": "request", "what": "/api/search (changed)" },
{ "kind": "animation", "what": "div#spinner, 2.4 s left" }
],
"shownChange": 0,
"domChanged": true
}
}The action's report, read right after its Input reply: each frame's part read now (on its arm's pipe, after the arm), and a layer still animating (kept since the baseline or new, blank and blocking) read again after it, up to layerExitMs. Use it when you want what the action led to on the page (live regions, layers, the state of the elements it touched) without waiting for a settle; agentSettle with report gives the same report once the page has settled.
Parameters:
armId: integer, required. The current action'sactionId, oragentSettleArm'sarmId; another, or one a later action replaced while it was read, is an error.layerExitMs: integer, optional. 0 to 1000 (default 0): how long such a layer may be waited for.agentNodeIds: array of integer, optional. Elements the action acted on, read with the report (itsnodes): what they are and read now.
Returns:
report:AgentActionReport.
{
"method": "Page.agentReport",
"params": { "armId": 17, "layerExitMs": 300, "agentNodeIds": [42] }
}navigateToHistoryEntry answered once the step has landed: the entry has become the last committed one, in whichever frame and process the step committed (a frame's step is cloned from the page's entry, so getNavigationHistory cannot tell it apart). The entry already current answers committed at once, without navigating. Use it for back/forward steps you want to wait on, including steps that only an iframe commits.
Parameters:
entryId: integer, required. Unique id of the entry to navigate to (fromPage.getNavigationHistory).timeoutMs: number, optional. How long to wait for the step, in ms: default 10000, at most 60000.
Returns:
outcome: enum.committed: the entry is the last committed one.failed: its navigation ended without committing.replaced: the page committed another entry, or a newer call came first.timeout: the wait ran out.url: string. The last committed entry's URL when it answered.
{
"method": "Page.agentNavigateToHistoryEntry",
"params": { "entryId": 5, "timeoutMs": 8000 }
}{ "outcome": "committed", "url": "https://example.com/list" }Streams the page's frames, uncompressed, into shared memory for a viewer in another process on this machine. Unlike startScreencast, nothing is encoded or sent over the protocol per frame, and the capture itself is throttled to maxFps rather than only the delivery. Frames are captured only when the page changes. One stream per session; it ends with stopFrameStream or when the session detaches. Windows and Linux.
The shared-memory section holds a 4096-byte header and three frame slots of 32-bit BGRA pixels, rows packed. Header, little-endian:
| Offset | Field | Type |
|---|---|---|
| 0 | magic "NFRM" |
uint32 (0x4D52464E) |
| 4 | version | uint32 |
| 8 | slot count | uint32 |
| 12 | header size | uint32 |
| 16 | slot size in bytes | uint64 |
| 24 | latest: sequence << 2 | slot |
uint64 |
| 32 + 32·i | per slot i: sequence (odd while being written) | uint64 |
| 40 + 32·i | width | uint32 |
| 44 + 32·i | height | uint32 |
| 48 + 32·i | stride | uint32 |
| 52 + 32·i | reserved | uint32 |
| 56 + 32·i | capture time, microseconds since the Unix epoch | int64 |
The event is signalled after each frame is published. A reader waits on the event, reads latest, checks that the slot's sequence is even and unchanged across its copy, and reads the slot's pixels.
On Windows the section is a named file mapping and the event a named auto-reset event. On Linux the section is a file in the shared-memory directory, mapped shared, and the event a FIFO beside it that receives one byte after each frame: a viewer that falls behind drains what is there and reads the newest frame. Both are owner-only and removed when the stream ends.
Parameters:
maxWidth: integer, required. Largest frame width wanted, in physical pixels. Frames are scaled down to fit, never up, and never beyond the page's size when the stream began.maxHeight: integer, required. Largest frame height wanted, in physical pixels.maxFps: integer, required. Most frames per second, 1 to 60.
Returns:
sharedMemoryName: string. Name of the file mapping holding the frames; on Linux the path of the file to map.frameEventName: string. Name of the auto-reset event signalled after each frame; on Linux the path of the FIFO.sharedMemorySize: integer. Size of the file mapping in bytes.slotWidth: integer. Largest frame width the slots can hold, in physical pixels.slotHeight: integer. Largest frame height the slots can hold, in physical pixels.
{
"method": "Page.startFrameStream",
"params": { "maxWidth": 1280, "maxHeight": 720, "maxFps": 30 }
}{
"sharedMemoryName": "Local\\nfrm-7f3a...",
"frameEventName": "Local\\nfrm-7f3a...-frame",
"sharedMemorySize": 11063296,
"slotWidth": 1280,
"slotHeight": 720
}Changes a running frame stream's limits, as when its viewer is resized.
Parameters:
maxWidth: integer, required.maxHeight: integer, required.maxFps: integer, required.
Returns: nothing.
{
"method": "Page.updateFrameStream",
"params": { "maxWidth": 960, "maxHeight": 540, "maxFps": 15 }
}Stops the frame stream and releases its shared memory.
Parameters: none. Returns: nothing.
{ "method": "Page.stopFrameStream" }Viewport and scroll geometry captured with an agent snapshot. All values are in the root frame's CSS-pixel space; screenshotScale converts to the pixels of the returned screenshot.
width: integer. Layout viewport width in CSS pixels.height: integer. Layout viewport height in CSS pixels.deviceScaleFactor: number. Device pixel ratio (CSS px to device px).scrollX: number. Horizontal scroll offset in CSS pixels.scrollY: number. Vertical scroll offset in CSS pixels.scrollWidth: number. Full scrollable content width in CSS pixels.scrollHeight: number. Full scrollable content height in CSS pixels.screenshotScale: number, optional. Image pixels per CSS pixel of the returned screenshot; present with a screenshot.
One interactive element, gathered across all frames (cross-origin OOPIFs and open or closed shadow DOM included). Geometry is composed into the root viewport's CSS-pixel space, so annotations land where the user sees the element.
backendNodeId:DOM.BackendNodeId. Stable CDP identity of the element (in its own renderer).agentNodeId: integer. Browser-minted handle, stable for the element's life in its document and never reused by another element of any document; used withresolveAgentNode,agentHitCheckandagentNodesAlive.frameId:FrameId. Id of the frame that owns this element.role: string. Computed accessibility role, or the tag-derived role when no ARIA role.name: string, optional. Accessible name.value: string, optional. Current value (form controls), if any. A password input reports one bullet per character instead of its contents.description: string, optional. Accessible description, if any.tag: string. Lowercased tag name (e.g.div,button,input).interactive: boolean. Whether the element is considered interactive/actionable.interactiveReason: string, optional. Why it was classified interactive:role,form-control,drag,listener,cursorortabindex.states: array of string. Active state flags:visible,enabled,focusable,focused,editable,checked,expanded,selected,disabled,readonly,required,draggable(something to pick up),drop-target(somewhere to let go),secret(a card field, its value bullets),invalid(withinvalidbelow).disabled,checked,readonlyandrequiredalso come from their aria attributes.x,y: number. Border-box X and Y in the root viewport's CSS-pixel space (viewport-relative).width,height: number. Border-box size in CSS pixels.inViewport: boolean. Whether the border box intersects the root viewport.obscured: boolean. True when a cross-context hit test at the element's action point lands on other content in any frame, so the element cannot be clicked.shadowHostBackendNodeId:DOM.BackendNodeId, optional. The shadow host's backend node id when this element lives inside a shadow tree.label: string, optional. Short handle drawn on the screenshot when marked (e.g.a1): the agent's id for the element, the same for its whole life in the document, in view or not. Every listed element has one.marked: boolean. Whether the element is marked (in the viewport, interactive and not obscured), so its label is drawn and it can be acted on now.color: string, optional. Name of the colour of this element's outline and badge (e.g.red). Present only for marked elements; neighbouring marks get colours as far apart as possible so a label binds unambiguously to its box.href: string, optional. Where this element points, resolved against the document base URL, for<a>,<area>,<link>. Absent when the element has no such attribute.src: string, optional. The same for<img>,<iframe>,<video>,<audio>,<source>,<embed>,<script>.coveredBy: string, optional. When obscured: what lies over it where a press would land, said with where it is ("the page's div#ov" over an element in a frame, "div#panel in another frame"), or only where when it could not be named; empty when it was not asked. On a marked element: what its own process lays over every part of it a press could reach (its own document's content, or the page's over a same-process frame); it keeps its label, and a press on it is refused. A cover in an open layer the element is not in is named by that layer (listbox "City"), as is one on that layer's veil, the backdrop beside its box (dialog "Choose a plan").layer: integer, optional. Scopeonorall: the innermost entry oflayersholding it.underLayer: integer, optional. Scopeonorall, withcoveredBy: the index inlayersof the innermost layer holding what lies over it (the cover, or that layer's veil), its own layer included; for the content of a frame in no layer of its own, the layer holding that frame. Absent when none does.invalid: array of string, optional. Why the page or its own constraints call it invalid:aria,valueMissing,typeMismatch,patternMismatch,tooLong,tooShort,rangeUnderflow,rangeOverflow,stepMismatch,badInput,customError,messageShown(the browser's own warning shows for it). A constraint counts once the field was edited or its form's submit tried, or while it holds a value;aria-invalidalways. Absent when valid.error: string, optional. Withinvalid, the page's words for what is wrong: the shown text of itsaria-errormessagetargets, else its custom validity message; 160 characters. Never for a password or card field.reads: string, optional. What it reads asagentNodesAlivereads it (aria-label, labelled-by and label texts, title, placeholder, text), for a later id check to compare like with like. Absent when empty.
The page's main scroller: the box a scroll of the page means now. It is the page's own window when its document scrolls 16 px or 2% of the viewport height or more; else, of the boxes a user can scroll with room to and the windows of frames whose documents scroll as far, each showing 20 x 20 CSS px or more and open to a hit test, the one that shows the most of itself (a document that scrolls a pixel or two is passed over, so the pane in it reads). With layers (scope on or all) and a blocking layer open, only what that layer holds. Frames of other processes are judged too.
positionX,positionY: number. Where it is along each axis, in CSS px of the scroller: its offset less its minimum, so counted from its visual top-left and growing down and right. A reversed pane (a chat laid out bottom up) that opens at its visual bottom readspositionY = maxY.maxX,maxY: number. As far as a user can scroll it along each axis, in CSS px of the scroller; 0 where its overflow is hidden or clip that way.lengthX,lengthY: number. How much of its content shows along each axis, in CSS px of the scroller:lengthYis how tall it shows.x,y,width,height: number. What shows of it, in the root viewport's CSS-pixel space (viewport-relative), as the elements' boxes.name: string, optional. Its name in the listing when it is listed and named there (a frame's window: its listed frame element's); else, for an element, its aria-label, its first aria-labelledby target's text or its title; else named as covers are (tag#idortag.class, then its text when short), a frame's window by its frame element. Absent for the page's own window.role: string, optional. The listed element's role when it is listed; else the first word of its role attribute, lower-cased, else its tag. Absent for a window whose frame element is not listed.isPage: boolean. The page's own window:viewport'sscrollX,scrollY,scrollWidthandscrollHeightsay the same.wheelReaches: boolean. A wheel turned at the middle of what shows would scroll it: false under a veil, a fixed bar or a scroller inside it. Judged in its own process, and by whether the page shows its frame there: what another process lays over it is not seen.layer: integer, optional. With layers: the innermost entry oflayersholding it, else the one holding its frame.underLayer: integer, optional. With layers andwheelReachesfalse: the entry oflayersover its middle, abovelayer(a list open over the pane), when its own process can tell; absent otherwise.agentNodeId: integer, optional. A listed element's own; one minted for an element not listed (placementscroller); a listed frame element's for a frame's window. Absent for the page's own window, and for a window whose frame element is not listed.label: string, optional. Its label, under the same rule.
A layer open on the page (a modal, a drawer, a menu, a popover) in captureAgentSnapshot's layers and an action's report, bottom to top.
kind: string.dialog,alert,menu,listbox,popover,fullscreen,pickerorpanel.name: string. Its author's name (not one that only names the kind), else its<h1>, else its title heading, else its text: 60 characters at most.head: string. Its text, about 600 characters at most; never a field's value.how: string. How it was found:top-layer,probe,veil,inertoraria.blocking: boolean. Whether it shuts off the page behind it: a click there cannot reach the page.nodeId: integer. Its root'sDOMNodeIdin its frame's process: withframeId, what it is while the node lives.frameId:FrameId. The frame whose document holds it.elementCount: integer, optional.captureAgentSnapshotonly: listed elements in it (for an entry of the page's own frame, with what the frames it holds list).behindCount: integer, optional.captureAgentSnapshotonly: elements left out behind it that a scopealllisting would list (controls, and what is off-screen).animatingMs: integer, optional. The longest time left, in ms, of an animation or transition running on it, on what holds it, on its veil or on a large part of it: it may be opening or closing. Absent when none.
Page.AgentHiddenGroup
Elements captureAgentSnapshot left out, with scope on, because a click cannot reach them, by what they are behind.
behind: string. The layer's name, or what covers them ascoveredBysays it.layer: integer, optional. The index inlayerswhen they are behind a layer.inView: integer. How many were in view, of those a scopealllisting would list (controls in view, and what is off-screen). Text in view behind it is left out too, uncounted; a group of only such text is not given.offscreen: integer. How many were off-screen.
A layer named by its key, as listed.
kind: string.name: string.frameId:FrameId.nodeId: integer.
A layer kept since the baseline whose head changed.
index: integer. Into the report's, oragentAnnouncements',layers.headBefore: string.
A live region (aria-live, role alert/status/log, <output>).
regionId: integer. Browser-minted, stable for the region's life in its document.frameId:FrameId.kind: enum.alert,status,log,outputorlive.assertive: boolean.text: string. 300 characters of its text: the last forlog, else the first; never a field's value.
What a region said since the last action, toasts included.
key: string. Stable across reads of the same entry; unique across the documents of its frame.region:AgentLiveRegion.gone: boolean. That text is no longer shown at this read.beforeAction: boolean, optional. Heard before the latest action armed the watch (a press, key, wheel, select, drop oragentSettleArm), while an earlier watch still looked and in the 30 s before, and carried on into its record; a read may have returned it already, under the same key. Absent when heard during it.unwatched: boolean, optional. Recorded by a read's closing pass while no watch looked (between calls), not by the watch; or by the browser's read of the regions alone between calls, after the page's frames.own: boolean, optional. Heard while no action's own span was open: the page said it by itself (a clock, a carousel, a status it changed later). An action's span runs from its arm (a press, key, wheel, select, drop oragentSettleArm) until its report (agentReport, after any layer it waits out, or the settle's) read the page, or 30 s when none does. Absent when heard in one.agoMs: integer. How long before this read it was heard, in ms (for one a read's closing pass recorded: when that pass found it).changes: integer, optional. How many changes of its region it stands for (absent: 1). A region keeps 3 entries an arm while a watch looks and 1 between calls; past that its newest change takes the place of its latest entry, under a new key, and adds to its count: a clock between calls is one entry, its newest tick, standing for every tick heard.replaced: string, optional. Withchanges, the text of the entry it took the place of, asregion.textreads (never a field's value): a clock's last tick but one, or the "Searching..." before "3 results".added: string, optional. For alog, the text its change added (what came after where its text ended, or before where it began for a log that adds at the top) and, withchanges, what they all added one way; 300 characters from its start, cut at a word and marked "...". Absent when none could be told: rewritten, removed, a change too large to place, a log first seen since the last action (what it held was not seen added), or one past the 32 logs kept for its local root.
What changed since the listing named by captureAgentSnapshot's since.
unchanged: boolean.added: array ofAgentDeltaAdded.removed: array ofAgentDeltaRemoved.changed: array ofAgentDeltaChanged.reordered: array of integer.agentNodeIds whose order changed.focus:AgentDeltaFocus, optional. Present only when it changed.url: string, optional. Present only when it changed.title: string, optional. Present only when it changed.scroll:AgentDeltaScroll, optional. Present only when it changed.layersOpened: array of integer. Indices intolayersof entries not open in the baseline.layersClosed: array ofAgentLayerRef.announcements: array ofAgentLiveRegion.partial: boolean. A local root gave no answer; its elements are as in the baseline.
agentNodeId: integer.why: enum.new,shown,into_view,uncoveredorappended.appendedis what the page added since the document's first listing and left out off-screen until it came into view (offscreenModenone, orsummaryfor one that said nothing).newis also given to an element left out off-screen and never listed that is now listed off-screen (named, or made a control) and was on the page at the document's first listing; one a listing showed before isshown.
agentNodeId: integer.label: string.role: string.name: string, optional.why: enum.gone,hidden,out_of_vieworcovered.wasInView: boolean.baselineIndex: integer. Its index in the baseline'selements; -1 when not known (carried from a frame that did not answer).behindLayer: integer, optional.covered: the hiding layer's index in the currentlayers.coveredBy: string, optional.covered: what covers it, ascoveredBysays it, when it is not a layer.
agentNodeId: integer.what: enum.name,value,state,role,description,href,errororcoveredBy.error: the page's words for what is wrong changed while the element stayed invalid.coveredBy: what lies over it changed while it kept its place in view or covered (a marked element's mark, unless a click scrolls it out from under; a covered one's cover once named), ascoveredBysays it;fromortoabsent on the side with none.from,to: string, optional.fromStates,toStates: array of string, optional. Forstate.
agentNodeId: integer, optional. Absent: focus left every listed element.label: string, optional.
The record comes when the document's offsets, the main scroller or its place changed.
x,y: integer. The document's scroll, in whole CSS px.agentNodeId: integer, optional. The main scroller's, ascaptureAgentSnapshot'sscrollerhas it; absent for the page's own window and for a scroller with none.label: string, optional. The same for its label.
A held capture's text, frame by frame.
captureId: string. ForagentFinishCapture.frames: array ofAgentRedactionFrame.
One document of a frozen frame: its runs in paint order and its text fields. Runs never join across frames. Only the runs a secret could show in are given (they show, something may move them, or their field shows or may move), each with its neighbours up to 65,536 letters and digits each way, cut to those nearest it; runs far apart on the page may follow each other here.
runs: array ofAgentRedactionRun.fields: array ofAgentRedactionField.
One painted text run of a frozen frame: one line of one text node, as drawn (password bullets stay bullets; a card field's runs are never given).
text: string.inView: boolean.
A text field of a frozen frame, by its runs: runs[firstRun, endRun). One that neither shows nor may move may come with only some of its runs, or none.
firstRun: integer.endRun: integer.
agentFinishCapture's answer for one redaction frame, by index: the runs that show part of a secret, and the fields that hold one.
runs: array of integer. Indices into the frame'sruns.fields: array of integer. Indices into the frame'sfields.
A point in the space Input.moveTo's x and y take: the page's root view in DIPs, divided by the browser zoom, the embedding frame's CSS zoom and the pinch zoom. A point agentCanvasText answers can be passed to Input.moveTo as it is.
x: number.y: number.
A rectangle in AgentCanvasPoint's space.
x: number.y: number.width: number.height: number.
A run's baseline, from its left end to its right end. Left is the text's own left (before the canvas transform), whatever the direction: under a half turn it is on the screen's right.
start:AgentCanvasPoint.end:AgentCanvasPoint.
A text draw a 2D canvas still shows (agentCanvasText).
text: string. The string drawn (forfillTextClusterandstrokeTextCluster, the drawn substring), format characters included. A cluster draw is shaped at read time as that substring alone, so one of a joining script (Arabic, say) or with kerning across its edges may readfontChanged.font: string. The font the draw used (for a cluster draw, the cluster's font), written from its description as thefontgetter writes one: style, weight, small-caps, computed size and families.color: string. The style asfillStyleorstrokeStylewould give it now, orgradient,pattern.alpha: number.globalAlphaat the draw.stroke: boolean.strokeTextorstrokeTextCluster.direction: string.ltrorrtl, as resolved for the draw.bidi: boolean. The run holds more than one direction.baseline:AgentCanvasBaseline.width: number. The advance width, in the text's own units (afterletterSpacing,wordSpacing, kerning and themaxWidthsqueeze).advances: array of number. For every UTF-16 boundary from 0 to the text's length, the distance from the left end to that boundary's caret position, in the units ofwidth; code units inside one cluster share a distance. For ltr textadvances[0]is 0, for rtl text it iswidth. The point of boundary i isstart + (end - start) * advances[i] / width; withwidth0,start.quad: array ofAgentCanvasPoint. The run's box (left end to right end along the baseline, the font's ascent above it to its descent below): left-top, right-top, right-bottom, left-bottom. A run of no width (marks only) has every boundary atstart.exact: boolean.inexact: string, optional. Why not exact, until the run is removed or drawn again:partlyCovered: a clear or an opaque fill covered part of its middle half (of what lies on the canvas).notFollowed: an operation the record does not follow crossed its middle half: a path fill or wide stroke,strokeRect, an image,putImageData, a focus ring, anything drawn in a layer (a layer's end counts its whole clip, as a filter given tobeginLayermay spread its draws anywhere in it), a draw under a shadow or a filter (a filter set but not yet used counts), another composite mode, a gradient or patternfillRect. A straight stroke along an axis up to 3 px wide (an underline, a squiggle, a rule) counts only where it crosses the middle half, by the whole pixels it touches.fontChanged: the run shapes wider or narrower now than when drawn, or its font changed (a web font loaded, aFontFacecame or went) before its first read; itsadvancesare then the current shaping's, scaled to itswidth(spread evenly over it when nothing could be shaped), so every boundary's point stays in its box. Reading never starts a font load: a run whose font has not drawn since the page's fonts last changed (a web font came, went or loaded), or whose font's list holds a web font not loaded, is shaped with system fonts only, and readsfontChangedunless it used none of the page's web fonts.
A fillRect a 2D canvas still shows (agentCanvasText), opaque ones included.
quad: array ofAgentCanvasPoint.color: string.alpha: number.exact: boolean.inexact: string, optional.partlyCoveredornotFollowed, as a run's, judged on the whole fill; a straight stroke up to 3 px wide (an underline drawn over a selection) never makes a fill inexact.
A <canvas> element and what its 2D context still shows.
backendNodeId: integer.frameId: string. Its own frame.localRootFrameId: string. Its local root, forPage.agentHitCheck,Input.revealElementandagentCanvasText's ownbackendNodeIdandframeId.context: string.2d,webgl,webgpu,bitmaprenderer,offscreen(control transferred to an OffscreenCanvas) ornone. Only2dcanvases carry runs and fills.quad: array ofAgentCanvasPoint, optional. Its content box, as a run'squad; absent with no layout box.shownRect:AgentCanvasRect, optional. The part of it inside the viewport and every clipping ancestor; absent with no layout box, empty when none of it shows. Whether something else covers a point isPage.agentHitCheck's to say.exact: boolean. Every run and fill answered exact, and the canvas not truncated.truncated: boolean. The record's caps cut what this canvas shows, until it is emptied (reset, a resize, or a cover of the whole canvas): past 20,000 runs, 20,000 fills, 1,000,000 characters or 256 large items (one spanning more than 16 cells of 128 by 32 px) showing at once the oldest went; and a single draw of more than 4,096 characters is not kept (what it draws is not followed).recordBytes: number, optional. A2dcanvas's record: its own memory in bytes (an estimate from its stores' capacities), now.recordPeakBytes: number, optional. The same at its highest.runs: array ofAgentCanvasRun.fills: array ofAgentCanvasFill.
One answer of agentNodesAlive, and one entry of a report's nodes.
agentNodeId: integer, optional.label: string, optional.state: enum.alive: its renderer confirmed it.gone: the page no longer holds the id (the node was collected or detached, or the id was dropped past the id space's cap and is not among the newest 10 000 so dropped).elsewhere: the page never held the id or label.unknown: not confirmed yet, or dropped past the cap and among the newest 10 000 so dropped.role: string, optional.name: string, optional.placement: enum, optional.viewandoffscreen: where it is laid out.dropped: left out of the listing as off-screen, its id kept so it can come into view.coveredandbehind: hidden by another element or by a layer.unlisted: connected but not listed.gone.scroller: the box an action scrolled, listed for that alone.behind:AgentLayerRef, optional. Placementbehind: the layer that hides it; absent when what hides it is not a layer.rendered: boolean, optional.reads: string, optional. What it reads, as onAgentSnapshotElement.invalid: array of string, optional. For an alive node, as onAgentSnapshotElement.error: string, optional. As onAgentSnapshotElement.behindOpen: boolean, optional. WithagentNodesAlive'slayers, for placementbehind: whether the layer it is behind is open now; absent when its frame was not read.checked: string, optional. For an alive node, a checkbox or radio input's state ("true","false"or"mixed"), else itsaria-checked; absent when it has none.
One control of the page in a report's census (agentSettle's controls): a field or a button, rendered, with a box and visibility visible, wherever the page has scrolled. A section the page skips while it is off-screen (content-visibility: auto) lists what it held when last drawn: none when never drawn. Never its value.
backendNodeId:DOM.BackendNodeId. Its node, in the renderer of its frame's local root.localRootFrameId:FrameId. The local root's frame (its devtools frame token), asPage.resolveAgentNode'slocalRootFrameIdnames it; the control's own frame is not reported here.frameId:FrameId, deprecated. The same aslocalRootFrameId, under the nameAgentSnapshotElementuses for an element's own frame. To be removed in a later release.x,y,width,height: number. Its box, CSS px, in its local root's coordinates: the page's viewport for a control of the page's own process; stale for one in a section skipped off-screen.kind: string.fieldorbutton. Links are not controls here, nor an element with rolelistbox(the list a field opens); a<select>list box is one.role: string.textbox,searchbox,combobox,checkbox,radio,switch,slider,spinbuttonorbutton, by its role attribute first; a select ascomboboxorlistbox; an input with a format of its own by its type (date,time,datetime-local,month,week,color,file).label: string. The first that says something of: a label naming it withfor, a label holding it, its aria-labelledby targets' text, aria-label, placeholder, title; a button's own text or value; its name attribute. 80 characters; empty for none. Page text, by a DOM rule that can differ from the accessible name.disabled,readonly,required,checked: boolean, optional.secret: boolean, optional. A card number or security code field (an agent snapshot's statesecret).layer: integer, optional. The index in the report'slayersof the innermost one holding it: its own frame's, else the page's layer holding its frame. Absent when none does.invalid: array of string, optional. A field's, as onAgentSnapshotElement.error: string, optional.
What an action led to on the page besides its outcome, judged by the browser from the action's arm: the regions now and what they said, and the layers against the stack the document last read.
documentId: string.armId: integer. The arm it is judged from: an InputactionIdoragentSettleArm'sarmId.regions: array ofAgentLiveRegion. The regions with text now, asagentAnnouncementsreads them.heard: array ofAgentHeard. What they said since that arm, with what the arm carried on.layers: array ofAgentLayer. The layers open now, bottom to top.layersOpened: array of integer. Indices intolayersnot in the baseline stack; every one when this document had no stack read before.layersClosed: array ofAgentLayer. In the baseline stack and not open now, as they were read then.layersReworded: array ofAgentLayerReworded. Kept since the baseline, its head changed.baselineAgeMs: number, optional. When the baseline stack was read, in ms before the arm (negative: after it); absent when this document had no stack read before: then every layer open now is opened, and nothing is closed or reworded.navigated: boolean, optional. The main frame committed a new document since the arm: nothing else read of the page is reported.printAtMs: number, optional. A frame of the page asked to print since the arm: ms from the arm to the first ask, after a navigation too. The page waits inprint()until the print ends, and its frame may give no part.unansweredFrames: integer. Local roots that gave no part.nodes: array ofAgentNodeLife, optional. WithagentReport'sagentNodeIds: one per id, in order, asagentNodesAliveanswers it; absent after a navigation.controls: array ofAgentControl, optional. WithagentSettle'scontrols, the page's control census: every local root's controls, frame by frame, in tree order within each. Absent after a navigation, and when no local root gave one.controlsCut: array of string, optional. Withcontrols, the local roots (frame tokens) whose census is short: it stopped (past 400 controls, its walk's budget or its time), or the frame gave none in time. A control of such a frame missing fromcontrolsmay still be there.
What an input action led to, within its answer. Returned by Input.moveTo, dispatchMousePath, dispatchKeystrokes, dispatchKeyChord, dispatchPaste, performDrag, scrollBy, selectOptions, fillDateTime, pickColor and chooseFiles.
actionId: integer. The browser's id for the action; late events (Input.actionOutcome) echo it. It also names the action's arm forPage.agentSettleandPage.agentReport.handled: boolean. The renderer answered for the action's last event before the cap.waitedMs: number. From the dispatch to this answer.events: array ofActionEvent. In the order seen; empty: nothing started.
One thing an input action led to.
kind: string.navigation,newTab,popupBlockedorprint(a frame asked to print; the page waits inprint()until the print ends). Open: more kinds may follow.atMs: number. Ms from the action's dispatch (its press, first key, pick or drop) to when this was seen (a navigation: when it reached its state); negative: before it.state: string, optional.navigation:started,committedorfailed(a download isfailedwithisDownload).url: string, optional.navigation: the URL (committed: the final one).newTab,popupBlocked: the URL asked for.sameDocument: boolean, optional.mainFrame: boolean, optional.startedBeforeAction: boolean, optional. The navigation was already under way when the action was dispatched.frameId: string, optional. The frame navigated, or (print) asked (its devtools frame token).errorText: string, optional.failed: e.g.ERR_ABORTED,ERR_NAME_NOT_RESOLVED.isDownload: boolean, optional.title: string, optional. Only when the browser has one at report time.targetId: string, optional.newTab: its target id.disposition: string, optional.newTab,popupBlocked:newForegroundTab,newBackgroundTab,newPopupornewWindow, as asked.
Has the page finished reacting to the action? Settled when, through the quiet window, what the agent reads stayed the same in every frame, no navigation was pending, no request the action caused (or one started after it) was running, and no finite animation with 1.5 s or less to run was running in view.
settled: boolean.afterMs: number. Settled: from the action to the last change seen, request end, commit or end of a waited-for animation, in ms (0: none), never beforeuntilwas met. Not settled: from the action to when the browser stopped waiting.stillChanging: array ofSettleChange. At most 5, named. A settled report may name what never blocks: an animation with more than 1.5 s left, a request running over 2 s.renderingPaused: boolean, optional. The page drew no frames while its rendering waited for one: never settled.navigated: boolean, optional. The main frame committed a new document since the action; the settle ran on it, the cap from its commit.broughtForward: boolean, optional. The page was hidden, and was brought to the front for the settle; absent when it was not.shownChange: integer, optional. The elements shown now less at the action's arm (rendered, visibility visible, no opacity 0 on them or above them), summed over the page's local roots; absent when one that answered could not count both (past its walk's 50,000-node budget, or over other frames than at the arm). Every settle carries it.domChanged: boolean, optional. The DOM or the focus moved in some frame since the arm.
One thing still changing (or, never blocking, still running) when agentSettle answered.
kind: string.request,request-ended,animation,mutation,navigationorlifecycle. Open: more kinds may follow.what: string. A request's path without its query (with its host when not the document's); an element the latestcaptureAgentSnapshotlisted, by its label and name (a12 "Save"), any other astag#id.class, with(new),(changed)or(gone); an animation with its target and the time it has left; a pending navigation; a frame that did not answer.meanwhile: boolean, optional. A request not tied to the action: started after it, from no interaction.unanswered: boolean, optional. A frame that gave no reading in time (its renderer busy with a long script or the page held inprint(), or gone), not a change seen on the page (kindlifecycle).
What agentSettle waits for first; any one met meets it, and the page settles after it.
text: string, optional. A case-insensitive, space-collapsed substring of the rendered text, or of an interactive element's aria-label, title, alt or placeholder, in any frame.selector: string, optional. A CSS selector whose first match in some checked document (every frame's, orframeId's) is asstatesays (visibleby default); one that does not parse is an error.xpath: string, optional. An XPath expression in place ofselector(not both), the same way: the first node it selects, in document order (a text or attribute node is attached, never more); one that does not parse, or returns no node-set (a number, a string or a boolean), is an error. It is evaluated whole at each check (every 100 to 300 ms): keep it narrow on a large page.state: enum, optional. Whatselectororxpathwaits for, on the first match:attached(it exists),box(a box of positive size),visible(a box, visibility visible and its own opacity above 0), orhidden(no match, or the first is not visible), the last only withframeId. A frame not drawn or throttled is checked only forattached, and forhiddenby no match or its frame element not rendered.frameId: string, optional. A frame of this page: only its document is checked forselectororxpath. Absent: every frame. One not of this page is an error.appeared: boolean, optional. Met once a local root shows more elements than at the action's arm (shownChange's count), counted since this call: what a hover makes appear, a hover-intent menu's delay included.goneAgentNodeId: integer, optional. AnagentNodeIdof this document: met once that element is detached, not rendered ordisplay: none; at once when it is gone already.urlChanged: boolean, optional. The main frame's URL differs from the one at the action.urlContains: string, optional. The main frame's URL contains this.newTab: boolean, optional. The page opened a tab or window since the action.
The methods above are available whenever the browser runs; the switches below change what some of them can do or when their events fire. The first group is required for a method to work at all; the second shapes the behaviour the methods describe.
| Switch | What it gates |
|---|---|
--enable-canvas-text-record |
Required by Page.agentCanvasText, which fails without it, saying so. Presence-only and off by default: each 2D canvas of a page keeps a record of the text and rectangles drawn into it, at some cost in time to a page that draws much into its canvases (little when it redraws the same thing in the same place). What a page reads back from its canvases is the same with the switch and without it. |
--private-clipboard |
Required by Input.dispatchPaste, Input.readClipboard and Input.writeClipboard, which are refused without it. Presence-only: the browser keeps its own in-memory clipboard instead of the operating system's, so copy, cut and paste (keyboard shortcuts, execCommand and the async Clipboard API alike) work within this browser process and never read or overwrite the clipboard of the person at the machine, nor that of any other browser running beside it. The same platform-independent clipboard headless mode always uses. |
--dismiss-permission-prompts |
Required for Input.permissionPromptDismissed to ever fire. Presence-only: permission requests are queued and shown as usual, except that the prompt is never drawn; after a random 1-5 s, the time a person takes to read a prompt and close it, it is dismissed, and the event is sent. No decision is stored for the site; as after a person's dismissals, three of them put it under the 7-day embargo. A request from a background tab waits for the tab to be shown, as the prompt itself would. Also covers File System Access prompts. (The stock --deny-permission-prompts denies in the same call and persists the block, as headless mode does; it does not produce the event.) |
--movement-persona-seed |
The seed of the pointer's human-movement persona (one browser, one hand); an int64. It is the persona Input.moveTo, revealElement, scrollBy, performDrag, selectOptions, fillDateTime, pickColor and chooseFiles move with, the typist Input.dispatchKeystrokes types as, and the default seed of Input.probeMovementPersona. Absent: in the release binary, derived from --fingerprint-seed when that is given; otherwise a random seed for each browser run. |
--fingerprint-seed |
Release binary only. The master seed of the fingerprint identity, driving every per-switch auto / absent-value derivation, the movement persona's seed included when --movement-persona-seed is absent. Accepts auto or a 32-bit signed integer, and can be saved at chrome://browser-settings. |
--cancel-print-preview |
Shapes the print outcome several replies carry (Page.ActionEvent kind print, AgentActionReport.printAtMs, SettleChange.unanswered): a page's window.print() runs the scripted-print flow with no preview opening, and after a random 1-4 s the preview is closed as its Cancel would close it, so print() returns and the frame can answer again. Without it the page waits in print() until the preview is dealt with. Presence-only; Page.printToPDF is unaffected. |
--show-cdp-cursor |
Presence-only. Draws a cursor overlay while a DevTools client is attached, which makes the paths Input.moveTo, dispatchMousePath, performDrag and the other pointer commands take visible on screen. Not required by any method. |
| Local file access of the client | Not a switch, but a gate: Input.chooseFiles is refused when the DevTools client lacks local file access, as DOM.setFileInputFiles is. Browser.startVideoRecording is refused when the client may not write local files. |
| Windows and Linux | Page.startFrameStream, Page.updateFrameStream and Page.stopFrameStream exist on Windows and Linux. |
| Browser target | Browser.agentFetch, agentFetchCancel, startRecording, stopRecording, recordingMask, recordingStatus, startVideoRecording, setVideoRecordingTarget, pauseVideoRecording, resumeVideoRecording, markVideoRecording, stopVideoRecording and videoRecordingStatus answer "method not found" on any session that is not the browser target's. |