browser_assert_element
Check element visibility, disabled state, text, and checked status. Supports cross-iframe and polls for async updates.
Instructions
Assert the state of a specific element without pulling the full semantic surface. Returns: visible (boolean), disabled (boolean), text content, checked state (for checkboxes/radios), and backendNodeId.
Use this for quick state checks on known elements after an action, rather than re-fetching the entire page.
Supports cross-iframe elements when using backendNodeId. Optionally set timeoutMs to poll for the element (useful for async UI changes like toasts or loading spinners).
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_assert_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | No | CSS selector to find the element | |
| timeoutMs | No | If provided, poll for the element at ~100ms intervals until found or timeout elapses. Useful for waiting on async UI changes (e.g., toasts, dialogs, loading spinners). Omit for instant check. | |
| backendNodeId | No | Backend DOM node ID of the element |