browser_get_dom
Extract HTML content from web page elements using CSS selectors to inspect page structure and analyze DOM elements for debugging or automation tasks.
Instructions
Return the HTML of a DOM element (or document.body when no selector is given), truncated to maxLength characters. Use when browser_get_interactive is insufficient for inspecting page structure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| selector | No | CSS selector for root element. Omit for document.body. | |
| tabId | No | Tab ID from browser_connect. Omit to use the first page tab. | |
| port | No | Chrome/Edge CDP remote debugging port. | |
| maxLength | No | Maximum characters to return (default 10000) | |
| includeContext | No | When true, append activeTab and readyState context to the response. |