getElementHierarchy
Retrieve the hierarchical structure of webpage elements, including parent-child relationships, using CSS selectors. Optional parameters allow including text content, attributes, and setting depth for detailed web analysis.
Instructions
Get the hierarchical structure of page elements with parent-child relationships
Input Schema
Name | Required | Description | Default |
---|---|---|---|
includeAttributes | No | Include element attributes (default: false) | |
includeText | No | Include text content of elements (default: false) | |
maxDepth | No | Maximum depth to traverse (-1 for unlimited, default: 3) | |
selector | No | CSS selector for root element (default: 'body') |