Get HTML
get_htmlRetrieves HTML markup of a page or element via CSS selector, returning the nth match. Use for attributes or structure rather than text.
Instructions
Get the HTML of a page or element. Use when you need markup, attributes or structure rather than text. Returns one element only: it reports how many matched and takes nth to pick a different one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nth | No | Which match to return when several exist, 0-based | |
| outer | No | Include the element tag itself | |
| tab_id | No | Arc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first. | |
| selector | No | CSS selector, or one of: "text=Some label" (visible text, case-insensitive substring, exact matches ranked first); "ref=e12" (a ref from snapshot, re-resolved if the page re-rendered); "role=button[name="Save"]" (ARIA or implicit role, name an exact match, or name~="sav" for a substring); "label=Email" (the control a label names); "placeholder=Search" | |
| max_chars | No | Truncate at this length |