browser_get_interactive
Identify interactive page elements like links, buttons, and inputs with CSS selectors and state information to enable reliable browser automation and testing.
Instructions
List all interactive elements (links, buttons, inputs, ARIA controls) on the current page with CSS selectors, visible text or value for inputs, and viewport status — use before browser_click_element to discover stable selectors, and prefer this over screenshot when verifying button/toggle state after submission (no image tokens, structured output). scope limits to a CSS subsection (e.g. '.sidebar'). Returns state (checked/pressed/selected/expanded) for ARIA custom controls. Caveats: Selectors are CDP-generated snapshots — re-call after page navigates or re-renders. Input text reflects the empty-field hint text when defined (takes priority over typed value) — use browser_eval('document.querySelector(sel).value') to read actual typed content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | CSS selector to limit the search scope (e.g. '.s-main-slot', '#nav-search-form'). Omit to scan the full page. | |
| types | No | Element types to include. Default 'all' returns links, buttons, and inputs. | |
| inViewportOnly | No | When true, only return elements currently visible in the viewport. | |
| maxResults | No | Maximum number of elements to return (default 50). | |
| tabId | No | Tab ID from browser_connect. Omit to use the first page tab. | |
| port | No | Chrome/Edge CDP remote debugging port. | |
| includeContext | No | When true, append activeTab and readyState context to the response. |