Get element
browser_get_elementRetrieve an element's role, name, state, bounding box, and robust Playwright locator using a snapshot ref, selector, or label to locate and inspect UI elements for browser automation.
Instructions
Role, name, state, bounding box and a robust Playwright locator for an element.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_get_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nth | No | ||
| ref | No | Element ref from snapshot (preferred) | |
| name | No | ||
| role | No | ||
| text | No | ||
| exact | No | ||
| label | No | ||
| pageId | No | ||
| testId | No | ||
| within | No | Scope to a unique container (ref, role+name, label, testId or CSS selector) | |
| session | No | ||
| selector | No | CSS (last resort) | |
| placeholder | No |