browserdebug
v0.1.0Debug web pages in Chrome: performance traces, network, console, snapshots, screenshots.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
click
Click on the provided element
| Parameter | Type | Description |
|---|---|---|
uid * | string | The uid of the element from a page snapshot to click |
dblClick | boolean | Whether to double click the element |
drag
Drag an element onto another element
| Parameter | Type | Description |
|---|---|---|
from_uid * | string | The uid of the element to drag from |
to_uid * | string | The uid of the element to drag onto |
fill
Type text into an input, text area or select an option from a select element
| Parameter | Type | Description |
|---|---|---|
uid * | string | The uid of the input, text area, or select element to fill |
value * | string | The text to type into the element, or the value of the option to select |
fill_form
Fill out multiple form elements at once
| Parameter | Type | Description |
|---|---|---|
elements * | array | The form elements to fill, each given as an element uid and the value to enter |
handle_dialog
Handle a browser dialog (accept or dismiss)
| Parameter | Type | Description |
|---|---|---|
action * | string | The dialog action to take: accept or dismiss |
promptText | string | Optional text to enter into a prompt dialog before accepting it |
hover
Hover over the provided element
| Parameter | Type | Description |
|---|---|---|
uid * | string | The uid of the element from a page snapshot to hover over |
press_key
Press a key or key combination in the browser
| Parameter | Type | Description |
|---|---|---|
key * | string | The key or key combination to press, such as Enter or Control+A |
upload_file
Upload a file through a file input element
| Parameter | Type | Description |
|---|---|---|
filePath * | string | The local path of the file to upload |
uid * | string | The uid of the file input element to upload through |
close_page
Closes the page by its index; the last open page cannot be closed
| Parameter | Type | Description |
|---|---|---|
pageId * | number | The index of the page to close, as listed by list_pages |
list_pages
Get a list of pages open in the browser
new_page
Open a new tab and load a URL
| Parameter | Type | Description |
|---|---|---|
url * | string | The URL to load in the new tab |
background | boolean | Whether to open the new tab in the background without selecting it |
timeout | number | Optional navigation timeout in milliseconds |
select_page
Select a page as the context for future tool calls
| Parameter | Type | Description |
|---|---|---|
pageId * | number | The index of the page to select, as listed by list_pages |
bringToFront | boolean | Whether to bring the selected page to the front |
wait_for
Wait until any of the provided texts appears on the selected page
| Parameter | Type | Description |
|---|---|---|
text * | array | The texts to wait for; the call returns when any one of them appears on the page |
timeout | number | Optional timeout in milliseconds to wait for the text |
emulate
Emulates network, CPU, geolocation, user agent and colour scheme features on the selected page
| Parameter | Type | Description |
|---|---|---|
colorScheme | string | Optional colour scheme to emulate: light, dark, or auto |
cpuThrottlingRate | number | Optional CPU throttling rate; 1 means no throttling and the value must be at least 1 |
geolocation | string | Optional geolocation to emulate, given as a latitude and longitude pair |
networkConditions | string | Optional network conditions preset to emulate, such as Slow 3G or Fast 3G |
userAgent | string | Optional user agent string to emulate |
resize_page
Resizes the selected page's window so the page fits the given dimensions
| Parameter | Type | Description |
|---|---|---|
height * | number | The new window height in pixels |
width * | number | The new window width in pixels |
performance_analyze_insight
Provide more detailed information on a specific performance insight from a recorded trace
| Parameter | Type | Description |
|---|---|---|
insightName * | string | The name of the performance insight to analyse |
insightSetId * | string | The id of the insight set from a recorded performance trace |
performance_start_trace
Start a performance trace on the selected page
| Parameter | Type | Description |
|---|---|---|
autoStop | boolean | Whether to stop the trace automatically once the page has loaded |
filePath | string | Optional file path to save the trace to when it stops |
reload | boolean | Whether to reload the page after starting the trace |
performance_stop_trace
Stop the active performance trace
| Parameter | Type | Description |
|---|---|---|
filePath | string | Optional file path to save the stopped trace to |
get_network_request
Get a network request by its request id; without an id, the currently selected request in DevTools
| Parameter | Type | Description |
|---|---|---|
reqid | number | Optional request id of the network request; the request currently selected in DevTools is used when omitted |
list_network_requests
List all requests for the currently selected page since navigation
| Parameter | Type | Description |
|---|---|---|
includePreservedRequests | boolean | Whether to include requests preserved from the previous navigation |
pageIdx | number | Optional page index of the request list to return |
pageSize | number | Optional maximum number of requests to return in one page of results |
resourceTypes | array | Optional list of resource types to filter the requests by |
evaluate_script
Evaluate a JavaScript function inside the currently selected page and return its result
| Parameter | Type | Description |
|---|---|---|
function * | string | The JavaScript function declaration to evaluate inside the selected page |
args | array | Optional element uids to pass to the function as its arguments |
get_console_message
Get a console message by its id
| Parameter | Type | Description |
|---|---|---|
msgid * | number | The id of the console message, as listed by list_console_messages |
list_console_messages
List all console messages for the currently selected page since navigation
| Parameter | Type | Description |
|---|---|---|
includePreservedMessages | boolean | Whether to include messages preserved from the previous navigation |
pageIdx | number | Optional page index of the message list to return |
pageSize | number | Optional maximum number of messages to return in one page of results |
types | array | Optional list of console message types to filter by, such as log, error, or warning |
take_screenshot
Take a screenshot of the page or an element
| Parameter | Type | Description |
|---|---|---|
filePath | string | Optional file path to save the screenshot to |
format | string | Optional image format of the screenshot: png, jpeg, or webp |
fullPage | boolean | Whether to capture the full page instead of the visible viewport |
quality | number | Optional image quality from 0 to 100, for the jpeg and webp formats |
uid | string | Optional uid of an element to screenshot instead of the page |
take_snapshot
Take a text snapshot of the currently selected page based on the accessibility tree
| Parameter | Type | Description |
|---|---|---|
filePath | string | Optional file path to save the snapshot to |
verbose | boolean | Whether to include verbose accessibility tree details in the snapshot |