chromium-devtools-mcp

v0.6.0
chromium-devtools-mcp Checked 4 days ago Published 9 days ago

MCP server that lets AI agents drive your Chromium browser through the DevTools Protocol

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_tabs

List tabs of the session or tabs available to claim.

ParameterTypeDescription
limitintegerMaximum tabs to return. Defaults to 100.
scopestringOwned tabs or tabs available to claim. Defaults to owned.

popup_list

List available popups opened by an owned tab, optionally waiting for IDs absent from a baseline.

ParameterTypeDescription
baselineIdsarrayPreviously observed popup IDs to exclude. Omit to list all available popups.
tabstringOpener tab id. Defaults to the selected tab.
timeoutMsintegerMaximum wait for a matching popup in milliseconds. Defaults to 0.

window_list

List distinct windows containing tabs owned by this session without focusing them.

ParameterTypeDescription
limitintegerMaximum windows to return. Defaults to 100.

list_sessions

List open sessions of the daemon without their tab details.

select_tab

Select a tab of the session, claiming an available tab when needed.

ParameterTypeDescription
tab *stringTab id returned by the tab tools.

new_tab

Open a new background tab and select it. With a url it waits until the page has loaded or timeoutMs passes, and returns the committed url, the load state reached and the document readyState.

ParameterTypeDescription
selectbooleanSelect the new tab. Defaults to true.
timeoutMsintegerHow long to wait for the page to load. Defaults to 30000 ms.
urlstringURL to open: http, https or about:blank. Defaults to about:blank.

tab_duplicate

Open the current address of an owned tab in a new background tab without copying its history or page state.

ParameterTypeDescription
selectbooleanSelect the new tab. Defaults to false.
tabstringSource tab id. Defaults to the selected tab.
timeoutMsintegerMaximum load wait in milliseconds.

close_tab

Close a tab opened by this session.

ParameterTypeDescription
tabstringTab id. Defaults to the selected tab.

bring_to_front

Bring a tab and its window to the front and take the keyboard focus. Call it only when the user asked to see the tab. It works only when the owner enabled allowFocus.

ParameterTypeDescription
tabstringTab id. Defaults to the selected tab.

page_info

Read the URL, title, viewport and scroll position of a tab.

ParameterTypeDescription
tabstringTab id. Defaults to the selected tab.

page_history

List the recent navigation history of a tab with redacted addresses.

ParameterTypeDescription
limitintegerMaximum number of entries. Defaults to 50.
tabstringTab id. Defaults to the selected tab.

browser_info

Read the version of the browser the session is connected to, for bug reports and for checking what a page runs on.

ParameterTypeDescription
tabstringTab id. Defaults to the selected tab.

page_extract

Read links, headings, meta tags, tables and form structure of the top document without form values.

ParameterTypeDescription
kindsarrayWhat to read: links, headings, meta, forms, tables. Defaults to all five.
limitintegerMost items per kind. Defaults to 50, at most 200.
tabstringTab id. Defaults to the selected tab.

page_navigate

Navigate a tab to a URL, go back or forward, reload it, open a history entry, or stop its loading.

ParameterTypeDescription
actionstringWhat to do. Defaults to url.
historyIndexintegerEntry index from page_history. Only for the history action.
ignoreCachebooleanReload ignoring the cache. Only for the reload action.
tabstringTab id. Defaults to the selected tab.
timeoutMsintegerHow long to wait for the page. Defaults to 30000 ms.
urlstringURL to open, http, https or about:blank. Required for and only valid with the url action.
waitUntilstringWait for the load event, DOMContentLoaded, or return at once. Defaults to load.

js_evaluate

Run JavaScript in a tab and return the result. Page exceptions come back as data, not as tool errors.

ParameterTypeDescription
expression *stringJavaScript expression to evaluate.
awaitPromisebooleanAwait a promise result. Defaults to true.
maxResultCharsintegerMaximum characters of the returned value. Defaults to 50000.
tabstringTab id. Defaults to the selected tab.
targetobjectRun the expression against an element. A function expression is called as is, anything else runs as the body of function (element) { ... }. Both receive the element as this and as the first argument.
timeoutMsintegerHow long to wait for the result. Defaults to 10000 ms.

dom_query

Find elements by a CSS selector and read their text, attributes and boxes. Total counts every match in the page; the text filter scans at most the first 2000 matches and pierce visits at most 20000 elements; truncated reports when more matches exist than returned or a cap applied.

ParameterTypeDescription
selector *stringCSS selector to match. Use >>> to chain through shadow roots, for example my-app >>> #inner.
allbooleanReturn up to limit matches instead of one. Defaults to false.
attributesarrayAttribute names to include.
framestringFrame id from dom_snapshot or an iframe CSS selector that matches exactly one iframe. Defaults to the main frame.
includeBoxbooleanInclude bounding boxes. Defaults to true.
limitintegerMaximum matches to return. Defaults to 20 with all and to 1 without it.
piercebooleanMatch through open shadow roots. Closed shadow roots need a >>> chain. Defaults to false.
tabstringTab id. Defaults to the selected tab.
textstringKeep only elements whose text contains this, case insensitively.

dom_snapshot

Read a compact text snapshot of the page with element ids for later calls. Take a new snapshot after the page changes. It reads at most 20000 accessibility nodes, at most 50 levels deep, and the DOM to 10 levels; truncated reports when a cap applied.

ParameterTypeDescription
includeHiddenbooleanInclude hidden elements. Defaults to false.
interactiveOnlybooleanList interactive elements with ancestor context. Defaults to false.
maxCharsintegerMaximum characters of the snapshot text. Defaults to 50000.
maxFramesintegerMaximum iframe contents to include. Defaults to 20. Frames beyond the limit are listed with omitted true.
modestringChoose which page content to show. Defaults to all, or interactive when interactiveOnly is true.
rootobjectLimit the snapshot to the subtree of this element.
tabstringTab id. Defaults to the selected tab.

a11y_snapshot

List the accessibility tree of a tab as structured nodes with role, name, value and states, and count the controls that have no accessible name.

ParameterTypeDescription
includeHiddenbooleanInclude hidden nodes. Defaults to false.
interactiveOnlybooleanList only interactive nodes such as buttons, links and fields. Defaults to false.
maxNodesintegerMaximum nodes to return, up to 2000. Defaults to 500.
rolesarrayList only nodes with one of these roles, for example heading or link.
rootobjectLimit the tree to the subtree of this element.
tabstringTab id. Defaults to the selected tab.

dom_selector

Turn an element into a CSS selector and a role locator that find it again, checked to match only that element.

ParameterTypeDescription
target *objectElement uid from a snapshot or query, or any other target.
tabstringTab id. Defaults to the selected tab.

find_in_page

Find visible text in the top document of a tab, list where it is, and with scroll true bring one match to the middle of the view.

ParameterTypeDescription
text *stringText to find. A match lies inside one text node.
caseSensitivebooleanMatch the case exactly. Defaults to false.
indexintegerWhich listed match to scroll to when scroll is true. Defaults to 0.
maxMatchesintegerMost matches to list. Defaults to 10, at most 50.
scrollbooleanScroll a match into view. Defaults to false, which changes nothing.
tabstringTab id. Defaults to the selected tab.

dom_edit

Edit one element without JavaScript: attributes, text, HTML, removal or classes. Returns the previous value for a revert.

ParameterTypeDescription
action *stringWhat to do.
target *objectElement uid from a snapshot or query, or a CSS selector.
classNamestringClass token, for add_class, remove_class and toggle_class.
htmlstringHTML content, for set_html, up to 100000 characters.
namestringAttribute name, for set_attribute and remove_attribute.
tabstringTab id. Defaults to the selected tab.
textstringText content, for set_text, up to 20000 characters.
valuestringAttribute value, for set_attribute, up to 20000 characters.

css_inspect

Read the computed style, matched CSS rules and box of an element. The box is null for an element without a rendered box, such as display none.

ParameterTypeDescription
target *objectElement uid from a snapshot or query, or a CSS selector.
forceStatesarrayPseudo classes to apply to the element while it is read, for example hover or focus, so the computed style and the matched rules show that state. They are removed again before the call returns.
includeBoxbooleanInclude the box model. Defaults to true.
includeMatchedRulesbooleanInclude the matched CSS rules. Defaults to true.
maxRulesintegerMaximum matched rules to return. Defaults to 30.
propertiesarrayComputed style properties to return. Defaults to a curated layout and typography list.
tabstringTab id. Defaults to the selected tab.

event_listeners

Inspect the event listener types and options registered directly on an element.

ParameterTypeDescription
target *objectElement uid, CSS selector or locator.
limitintegerMaximum listeners to return. Defaults to 100.
tabstringTab id. Defaults to the selected tab.

css_edit

Edit page styles without JavaScript: inline styles of one element, or rules in a page style tag. Returns the previous values for a revert.

ParameterTypeDescription
action *stringWhat to do.
target *objectElement uid from a snapshot or query, or a CSS selector. For add_rule and remove_rule it selects the document, or the shadow root, that holds the rule.
declarationsobjectProperty to value map, for set_style and add_rule. An empty value removes an inline property.
ruleIdstringRule id from add_rule, for remove_rule.
selectorstringRule selector, for add_rule.
tabstringTab id. Defaults to the selected tab.

console_logs

Read console messages, uncaught exceptions and browser messages of a tab. Only messages since capture started, plus what the browser replays.

ParameterTypeDescription
afterIdintegerReturn entries after this id for paging.
clearbooleanEmpty the buffer after reading. Defaults to false.
levelsarrayKeep only these severities.
limitintegerMaximum entries to return. Defaults to 100.
orderstringEntry order. Defaults to oldest.
tabstringTab id. Defaults to the selected tab.
textContainsstringKeep only messages containing this text.

network_requests

Read HTTP requests of a tab since network capture started. Sensitive query values and header values are replaced by [redacted].

ParameterTypeDescription
afterIdintegerReturn records after this id for paging.
clearbooleanEmpty the buffer after reading. Defaults to false.
failedOnlybooleanKeep only failed requests.
includeHeadersbooleanInclude redacted request and response headers. Defaults to false.
limitintegerMaximum records to return. Defaults to 50.
methodsarrayKeep only these HTTP methods.
resourceTypesarrayKeep only these CDP resource types.
statusMaxintegerKeep only responses with at most this status.
statusMinintegerKeep only responses with at least this status.
tabstringTab id. Defaults to the selected tab.
urlContainsstringKeep only URLs containing this text.
urlRegexstringKeep only URLs matching this regular expression, up to 200 characters. A match that takes longer than 50 ms is stopped and fails the call.

network_har

Save the HTTP requests of a tab as a HAR file that DevTools and other tools open, with redacted URLs and headers and no bodies.

ParameterTypeDescription
clearbooleanEmpty the network buffer of the tab after saving. Defaults to false.
failedOnlybooleanKeep only failed requests.
methodsarrayKeep only these HTTP methods.
resourceTypesarrayKeep only these CDP resource types.
statusMaxintegerKeep only responses with at most this status.
statusMinintegerKeep only responses with at least this status.
tabstringTab id. Defaults to the selected tab.
urlContainsstringKeep only URLs containing this text.
urlRegexstringKeep only URLs matching this regular expression.

downloads

Let a tab save files it downloads into a private directory, then list them or wait for one to finish.

ParameterTypeDescription
action *stringallow starts saving downloads of the tab, deny stops it, list shows them, wait returns the next finished download.
idstringWith wait: wait for this download instead of the next one that finishes.
tabstringTab id. Defaults to the selected tab.
timeoutMsintegerWith wait: how long to wait, up to 120000 ms. Defaults to 30000.

network_response_body

Read the response body of a request from network_requests. Binary bodies need asBase64.

ParameterTypeDescription
requestId *integerRecord id from network_requests.
asBase64booleanReturn binary content as base64. Defaults to false.
maxCharsintegerMaximum characters of the returned body. Defaults to 50000.
tabstringTab id. Defaults to the selected tab.

network_mock

Mock network responses or fail requests of a tab by URL pattern. The first matching rule in insertion order wins.

ParameterTypeDescription
action *stringWhat to do.
idstringRule id, for the remove action.
ruleobjectRule to add, for the add action.
tabstringTab id. Defaults to the selected tab.

page_dialogs

See and resolve JavaScript dialogs (alert, confirm, prompt, beforeunload) of a tab, or set an automatic policy.

ParameterTypeDescription
actionstringWhat to do. Defaults to status.
policystringAutomatic handling for dialogs that open later. Defaults to none and is cleared on reset.
promptTextstringText for a prompt, up to 10000 characters.
tabstringTab id. Defaults to the selected tab.

page_wait

Wait for a selector, text, URL, load state, a quiet document, a network response or an expression in a tab. A timeout is a result with met false, not an error. The expression condition runs arbitrary page JavaScript.

ParameterTypeDescription
domQuietMsintegerWait until the document has not changed for this many ms (child nodes, attributes and text, not inside shadow roots). Unlike a selector it needs no known element.
expressionstringJavaScript expression that must become truthy.
framestringFrame id from dom_snapshot to wait in. Only with a selector condition. Defaults to the main frame.
includePreviousbooleanWith a response condition: also accept a response that was captured before the call. Defaults to false.
loadStatestringPage load state to wait for.
msintegerPlain sleep in ms, up to 60000.
piercebooleanMatch the selector through open shadow roots. Only with a selector condition. Defaults to false.
pollMsintegerPoll interval in ms. Defaults to 100.
responseStatusintegerWith responseUrl or responseUrlRegex: the status the response must have.
responseUrlstringWait for a network response whose URL contains this text, after the call starts.
responseUrlRegexstringWait for a network response whose URL matches this regular expression, after the call starts. A match that takes longer than 50 ms is stopped and fails the call.
selectorstringCSS selector to wait for.
statestringSelector state. Defaults to visible.
tabstringTab id. Defaults to the selected tab.
textstringSubstring of the visible page text to wait for.
timeoutMsintegerHow long to wait. Defaults to 10000 ms.
urlstringURL substring to wait for.
urlRegexstringURL regular expression to wait for, up to 200 characters. A match that takes longer than 50 ms is stopped and fails the call.

storage_read

Read local storage, session storage or cookies of the page origin; the result lists keys and value sizes, and values are hidden unless you pass includeValues: true.

ParameterTypeDescription
kind *stringWhat to read.
includeValuesbooleanInclude values. Defaults to false; pass true to read them. Cookie values are secrets.
keysarrayStorage keys to read, for local and session. Defaults to all.
maxEntriesintegerMaximum entries to return. Defaults to 100.
maxValueCharsintegerMaximum characters per value. Defaults to 500.
tabstringTab id. Defaults to the selected tab.

storage_write

Write local storage, session storage or cookies of the page origin. Values are never echoed back.

ParameterTypeDescription
action *stringWhat to do.
kind *stringWhat to write.
confirmbooleanRequired true for clear.
cookiesarrayCookies to set.
entriesobjectEntries to set, for local and session. At most 100.
keysarrayKeys to remove, for local and session.
removearrayCookies to remove.
tabstringTab id. Defaults to the selected tab.

page_pdf

Print a tab to PDF. Needs a headless managed browser when the headed browser refuses to print.

ParameterTypeDescription
landscapebooleanUse landscape orientation. Defaults to false.
marginsobjectMargins in inches. Defaults to 0.4 on every side.
maxBytesintegerMaximum PDF bytes. Defaults to 8 MiB.
pageRangesstringPage ranges like 1-3,5.
paperHeightnumberPaper height in inches. Defaults to A4.
paperWidthnumberPaper width in inches. Defaults to A4.
preferCSSPageSizebooleanPrefer the CSS page size. Defaults to false.
printBackgroundbooleanPrint background graphics. Defaults to true.
scalenumberScale factor. Defaults to 1.
tabstringTab id. Defaults to the selected tab.

page_metrics

Read performance counters, layout metrics and navigation timing of a tab.

ParameterTypeDescription
tabstringTab id. Defaults to the selected tab.

perf_trace_start

Start recording a performance trace of a tab. Optionally reload the page so the whole load is recorded. Interact with the page, then call perf_trace_stop. Only one trace can record at a time in the browser.

ParameterTypeDescription
ignoreCachebooleanWith reload: ignore the cache. Defaults to false.
reloadbooleanReload the page once the trace has started, so the load is recorded. Defaults to false.
tabstringTab id. Defaults to the selected tab.

perf_trace_stop

Stop the trace of a tab, save it as a file that the Performance panel of Chrome DevTools opens, and report the Core Web Vitals, long tasks, main thread activity, requests and a rating of each. The file and the numbers keep the events of the frames of the tab and the address free events of its processes, not those of other tabs.

ParameterTypeDescription
tabstringTab id. Defaults to the selected tab.

heap_snapshot

Take a heap snapshot of a tab and report what is in memory: the total, the size by kind of object, the biggest classes and the detached DOM nodes. The page freezes while the snapshot is taken. The snapshot file can be saved for you to open in the Memory panel of Chrome DevTools; the result never holds the contents of strings.

ParameterTypeDescription
collectGarbagebooleanRun a garbage collection first, so only live objects are counted. Defaults to true.
savebooleanSave the snapshot as a .heapsnapshot file for the Memory panel of Chrome DevTools. Defaults to true. The file holds all the page memory, including secrets, so pass false to get the summary only.
tabstringTab id. Defaults to the selected tab.
topClassesintegerHow many classes to list, 1 to 50. Defaults to 15.

screencast_start

Start recording what a tab shows as a series of frames. The tab keeps rendering in the background, no window is raised. Call screencast_stop to get the recording. A static page produces few frames because a frame is made only when the page changes.

ParameterTypeDescription
fpsintegerFrames per second at most, 1 to 30. Defaults to 10.
maxDurationMsintegerStop recording after this many milliseconds, 1000 to 120000. Defaults to 30000.
maxWidthintegerWidest frame in pixels, larger pages are scaled down. Defaults to 1280.
qualityintegerJPEG quality of the frames, 1 to 100. Defaults to 60.
tabstringTab id. Defaults to the selected tab.

screencast_stop

Stop the screencast of a tab and save it. With ffmpeg on the PATH of the server the result is an MP4 file, or WebM when the MP4 encoder is missing; without ffmpeg the frames are saved as JPEG files in a directory with their durations, and the result says how to get a video.

ParameterTypeDescription
tabstringTab id. Defaults to the selected tab.

lighthouse_audit

Audit a page with the Lighthouse program installed on this machine and report the scores and the failed checks for accessibility, best practices and SEO (performance is optional; perf_trace_stop measures it better). It loads the page in a separate clean browser, so it sees the page as a new visitor without the logins of your tabs and does not touch your tabs. When Lighthouse is not installed the call fails and says what the user has to install.

ParameterTypeDescription
categoriesarrayWhat to audit. Defaults to accessibility, best-practices and seo.
devicestringScreen and network to emulate. Defaults to desktop.
tabstringTab id. Defaults to the selected tab.
timeoutMsintegerHow long to wait for the audit, 10000 to 300000 ms. Defaults to 120000.
urlstringPage to audit, http or https. Defaults to the page of the tab.

webauthn

Test passkey and security key sign-in on a tab with a virtual authenticator: add one, let the page register and sign in, and list, add, remove or clear its credentials. Chrome lets a page use WebAuthn only on the tab that has the focus of the browser, and a tab in the background fails with 'The page does not have focus', so pass bringToFront with add_authenticator (it needs allowFocus) or call bring_to_front first. The private keys are never returned.

ParameterTypeDescription
action *stringWhat to do.
authenticatorIdstringThe authenticator, from add_authenticator or list_authenticators.
automaticPresencebooleanadd_authenticator: answer every touch prompt at once, as there is no one to touch the key. Defaults to true.
bringToFrontbooleanadd_authenticator: bring the tab to the front first, because WebAuthn needs its focus. Needs allowFocus. Defaults to false.
credentialIdstringadd_credential and remove_credential: the credential id as base64url, as in PublicKeyCredential.id.
privateKeystringadd_credential: the private key as base64 of PKCS#8, an ECDSA P-256 key for the usual ES256 passkey.
protocolstringadd_authenticator: ctap2 supports passkeys, u2f is the older security key. Defaults to ctap2.
residentCredentialbooleanadd_credential: whether it is a discoverable credential. Defaults to true.
residentKeybooleanadd_authenticator: whether it stores discoverable credentials, which passkeys need. Defaults to true for ctap2; u2f cannot.
rpIdstringadd_credential: the relying party id, the domain of the site, such as example.com.
signCountintegeradd_credential: the signature counter. Defaults to 0.
tabstringTab id. Defaults to the selected tab.
transportstringadd_authenticator: internal is a platform authenticator such as Touch ID, the others are security keys. Defaults to internal for ctap2 and usb for u2f.
userDisplayNamestringadd_credential: the display name shown with the passkey.
userHandlestringadd_credential: the user handle as base64url.
userNamestringadd_credential: the user name shown with the passkey.
userVerificationbooleanadd_authenticator: whether it can verify the user, for example by PIN or fingerprint. Defaults to true for ctap2; u2f cannot.
userVerifiedbooleanadd_authenticator and set_user_verified: whether the user passes the verification. Defaults to true.

pwa_info

Read what a tab says about being an installable web app: its manifest, the app id, why Chrome would not offer to install it, and its service workers. It only reads: nothing is installed or launched.

ParameterTypeDescription
tabstringTab id. Defaults to the selected tab.

screenshot

Capture a tab as an image. Defaults to jpeg quality 80 to keep outputs small; works on background tabs without focusing them.

ParameterTypeDescription
clipobjectClip to this CSS rectangle in page coordinates measured from the document origin. Rejected together with target.
formatstringImage format. Defaults to jpeg.
fullPagebooleanCapture beyond the viewport. Defaults to false.
maskElementsarrayElements to cover in the image; inspect the result before sharing.
maskPasswordsbooleanCover password fields in the image. Dynamic page changes can still expose content.
maxBytesintegerMaximum image bytes. Defaults to 4 MiB.
maxDimensionintegerClamp the longest side to this many pixels. Defaults to 4096.
qualityintegerQuality for jpeg and webp. Defaults to 80.
scalenumberScale factor. Defaults to 1.
tabstringTab id. Defaults to the selected tab.
targetobjectClip to this element after scrolling it into view.

list_devices

List the built in devices for emulate_device, with an optional name or kind filter.

ParameterTypeDescription
kindstringKeep only phones, tablets or desktops.
querystringCase insensitive substring filter on the name.

emulate_device

Emulate a device size, pixel ratio, mobile viewport, touch and user agent on a tab. Reads back what the page reports. The Chrome version in a device user agent follows the connected browser. Client hints metadata is not emulated.

ParameterTypeDescription
devicestringDevice name from list_devices, case insensitive.
deviceScaleFactornumberExplicit pixel ratio, 0.5 to 5.
heightintegerExplicit CSS height, 100 to 10000.
landscapebooleanSwap width and height. Defaults to false.
mobilebooleanExplicit mobile viewport behavior.
resetbooleanRemove the device overrides of this tab. Defaults to false.
tabstringTab id. Defaults to the selected tab.
touchbooleanExplicit touch emulation.
userAgentstringUser agent for explicit emulation. Defaults to the real one.
widthintegerExplicit CSS width, 100 to 10000. Needs height, deviceScaleFactor, mobile and touch.

emulate_media

Emulate a media type and media features on a tab. Only the given fields change; reset removes every media override.

ParameterTypeDescription
colorSchemestringEmulated prefers-color-scheme.
contraststringEmulated prefers-contrast.
forcedColorsstringEmulated forced-colors.
mediastringMedia type to emulate, empty clears the type.
reducedMotionstringEmulated prefers-reduced-motion.
resetbooleanRemove the media overrides of this tab. Defaults to false.
tabstringTab id. Defaults to the selected tab.

emulate_network

Emulate network conditions on a tab: offline, slow-3g (2000 ms, 400/400 Kbps), fast-3g (562 ms, 1600/750 Kbps), 4g (170 ms, 9000/9000 Kbps), wifi (28 ms, 30000/15000 Kbps) or none. Shares Network.enable with the capture manager, never disables capture.

ParameterTypeDescription
blockUrlsarrayURL patterns to block with CDP wildcards, at most 50.
downloadKbpsintegerDownload ceiling in Kbps, at least 1, -1 disables throttling. 0 is rejected because it stalls the link.
latencyMsintegerAdded latency in ms, 0 to 60000.
offlinebooleanEmulate disconnection. Defaults to false.
presetstringNamed conditions. none restores a normal connection and clears blocked URLs.
resetbooleanRestore a normal connection and clear blocked URLs. Defaults to false.
tabstringTab id. Defaults to the selected tab.
uploadKbpsintegerUpload ceiling in Kbps, at least 1, -1 disables throttling. 0 is rejected because it stalls the link.

emulate_cpu

Request CPU throttling for a tab; the observed slowdown depends on the browser and workload.

ParameterTypeDescription
resetbooleanRemove the CPU throttling override. Defaults to false.
slowdownnumberRequested slowdown, from 1 to 20. 1 removes the override.
tabstringTab id. Defaults to the selected tab.

emulate_locale

Emulate locale, timezone and Accept-Language on a tab. Applies to new page loads: navigator.language changes after the next navigation, and number and date formatting follow the locale. Use emulate_geolocation for the location. reset restores the real locale and timezone.

ParameterTypeDescription
acceptLanguagestringAccept-Language header value, printable ASCII. Merges with the device user agent.
localestringBCP 47 tag such as de-DE. Merges with the previous timezone and accept language.
resetbooleanRemove the locale overrides of this tab. Defaults to false.
tabstringTab id. Defaults to the selected tab.
timezonestringIANA name such as Europe/Berlin.

emulate_geolocation

Emulate the geolocation of a tab and allow the page origin to read it, without a prompt. The page needs a secure context (https or localhost). Other tabs of the same origin in a shared browser read the real position while it is allowed. reset removes the override and the permission.

ParameterTypeDescription
accuracynumberAccuracy in meters. Defaults to 10.
latitudenumberLatitude in degrees, -90 to 90.
longitudenumberLongitude in degrees, -180 to 180.
originstringOrigin to allow, such as https://example.com. Defaults to the origin of the tab. Pass it to set the location before the first navigation.
resetbooleanRemove the geolocation override and permission of this tab. Defaults to false.
tabstringTab id. Defaults to the selected tab.

permissions

Grant, deny or reset a browser permission for a specific origin in this session's browser context.

ParameterTypeDescription
name *stringPermission to control.
origin *stringExact http or https origin without a path.
setting *stringOverride or release this session's override.

click

Click an element at the DOM level with element.click() semantics, without moving the mouse.

ParameterTypeDescription
target *objectElement uid from a snapshot or query, or a CSS selector.
scrollIntoViewbooleanScroll the element into view first. Defaults to true.
tabstringTab id. Defaults to the selected tab.
timeoutMsintegerHow long to wait, in milliseconds, for the element to be visible, enabled and not covered before refusing. Defaults to 2000; 0 does not wait.

input_click

Click an element, or a point of the viewport given in CSS pixels (a pixel of a screenshot divided by its pixelRatio), with trusted CDP mouse events, like a real user, without focusing the window.

ParameterTypeDescription
buttonstringMouse button. Defaults to left.
clickCountintegerHow many clicks in a row, 1 to 3. Defaults to 1.
forcebooleanWith target: skip the hit test and click through a covering element. Defaults to false.
modifiersarrayHeld modifiers, for example Control for a control click.
pointobjectViewport point to click, for example read from a screenshot. Pass this or target.
positionobjectWith target: offset in CSS pixels from the top left corner of the element. Defaults to the center.
tabstringTab id. Defaults to the selected tab.
targetobjectElement uid from a snapshot or query, or a CSS selector. Pass this or point.
timeoutMsintegerHow long to wait, in milliseconds, for the element to be visible, enabled and not covered before refusing. Defaults to 2000; 0 does not wait.

input_hover

Hover an element with trusted CDP mouse events, so hover styles and menus react.

ParameterTypeDescription
target *objectElement uid from a snapshot or query, or a CSS selector.
forcebooleanSkip the hit test and hover through a covering element. Defaults to false.
positionobjectOffset in CSS pixels from the top left corner of the element. Defaults to the center.
tabstringTab id. Defaults to the selected tab.
timeoutMsintegerHow long to wait, in milliseconds, for the element to be visible, enabled and not covered before refusing. Defaults to 2000; 0 does not wait.

input_drag

Drag from one element or viewport point to another and drop there, with trusted CDP mouse events. Works for pointer based drags and for HTML5 drag and drop.

ParameterTypeDescription
from *Where to press: an element (uid or selector) or a viewport point {x, y} in CSS pixels.
to *Where to release: an element (uid or selector) or a viewport point {x, y} in CSS pixels.
stepsintegerMouse moves between the two ends, 1 to 50. Defaults to 8.
tabstringTab id. Defaults to the selected tab.

input_type

Type text into a field with trusted input events, focusing it first without clicking.

ParameterTypeDescription
text *stringText to type, up to 20000 characters.
clearbooleanSelect all and delete in the field first. Defaults to false.
delayMsintegerDelay between characters in ms, 0 to 200. With 0 the text is inserted at once. delayMs times the text length must not exceed 60000 ms. Defaults to 0.
submitbooleanPress Enter after typing. Defaults to false.
tabstringTab id. Defaults to the selected tab.
targetobjectElement uid from a snapshot or query, or a CSS selector. Omit to type into the focused element.
timeoutMsintegerHow long to wait, in milliseconds, for the element to be visible, enabled and not covered before refusing. Defaults to 2000; 0 does not wait.

input_key

Press a key or chord like Enter or ControlOrMeta+C with trusted CDP key events.

ParameterTypeDescription
key *stringKey or chord, for example Enter, Tab, Control+A, ControlOrMeta+C, Shift++ (a trailing plus names the plus key).
repeatintegerHow many times to press, 1 to 20. Modifiers are held across repeats. Defaults to 1.
tabstringTab id. Defaults to the selected tab.
targetobjectElement uid from a snapshot or query, or a CSS selector. The element is focused first; omit to press into the focused element.
timeoutMsintegerHow long to wait, in milliseconds, for the element to be visible, enabled and not covered before refusing. Defaults to 2000; 0 does not wait.

input_scroll

Scroll the page by wheel deltas, to an edge, or an element into view, with trusted wheel events.

ParameterTypeDescription
atobjectPoint where the wheel turns. Defaults to the viewport center.
blockstringVertical alignment inside the viewport when scrolling to an element. Defaults to center.
deltaXintegerHorizontal pixels to scroll, negative scrolls left.
deltaYintegerVertical pixels to scroll, negative scrolls up.
tabstringTab id. Defaults to the selected tab.
targetobjectElement uid from a snapshot or query, or a CSS selector. Scrolls it into view; combine with block.
tostringScroll to the top or the bottom of the page.

input_select

Choose options of a select element by value, label or index, firing input and change.

ParameterTypeDescription
target *objectElement uid from a snapshot or query, or a CSS selector. Must resolve to a select.
indexesarrayOption indexes to select, exactly one of values, labels or indexes.
labelsarrayVisible option labels to select, exactly one of values, labels or indexes.
tabstringTab id. Defaults to the selected tab.
timeoutMsintegerHow long to wait, in milliseconds, for the element to be visible, enabled and not covered before refusing. Defaults to 2000; 0 does not wait.
valuesarrayOption values to select, exactly one of values, labels or indexes.

input_upload

Attach local files to a file input. The most sensitive input tool: it sends local files to a web page.

ParameterTypeDescription
files *arrayAbsolute local paths to attach, at most 20. Each must be a readable file under 100 MiB.
target *objectElement uid from a snapshot or query, or a CSS selector. Must resolve to an input of type file.
tabstringTab id. Defaults to the selected tab.

fill_form

Fill several form fields in one call, in order: text and textarea fields, selects, checkboxes and radio buttons. Stops at the first field that fails and says which fields were filled.

ParameterTypeDescription
fields *arrayFields to fill, 1 to 30.
tabstringTab id. Defaults to the selected tab.
timeoutMsintegerHow long to wait, in milliseconds, for the element to be visible, enabled and not covered before refusing. Defaults to 2000; 0 does not wait.