extract_semantic_dom_after
Runs declared fill/click/press/select/goto/wait actions, then captures the resulting DOM as Semantic JSON to expose post-interaction UI like toasts, validation messages, and dialogs.
Instructions
Like extract_semantic_dom, but first performs a short DECLARED list of actions (fill/click/press/select/goto/wait) in the main frame, then returns Semantic JSON of the RESULTING state. Use it for post-interaction UI a plain snapshot cannot see: success/error toasts, validation messages, opened dialogs. Derive action locators from a prior extract_semantic_dom call. The page must remain on allowlisted hosts after the actions, or nothing is extracted. Uniqueness reflects capture time — accumulating UI (chat threads, lists) can multiply matches later. The result's observed block lists navigations, xhr/fetch requests (method, path, status), console errors, dialogs and popups seen while the actions ran — use them for waitForURL/waitForResponse.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The page to extract. Must be http/https and on an allowlisted host. | |
| roles | No | Keep only nodes with these roles or tags (e.g. ['button','textbox','row']). | |
| scope | No | CSS selector to extract within — take it from an outline region's `selector` (e.g. 'main table', '[role="dialog"]'). Everything outside is skipped. | |
| actions | Yes | Declared actions (fill/click/press/select/goto/wait) executed in order in the MAIN frame after navigation. | |
| viewport | No | Viewport preset — 'mobile' is 375x812 with touch, for responsive states. | desktop |
| wait_for | No | Navigation wait. 'auto' (default) waits for load, then until the DOM has been quiet for 500ms (max 6s) — works on SPAs that render after load and on pages whose analytics never let the network go idle. 'networkidle' times out on such pages. | auto |
| max_nodes | No | Cap on extracted nodes; truncation is flagged, never silent. | |
| settle_ms | No | Wait after the last action before snapshotting (for toasts/animations). | |
| visible_only | No | Skip hidden nodes entirely. | |
| wait_selector | No | Optional selector to await before extracting (for SPA content). | |
| include_hidden | No | Keep hidden nodes flagged rather than dropping them. | |
| include_tables | No | Attach structured `tables` (headers, row identity, cells) and `dialogs` (label/value fields) inside the scope, for value assertions. | |
| max_output_chars | No | Budget for the node list; nodes past it are dropped in document order and counted in `omitted` (never silent). | |
| wait_selector_after | No | Selector to await (visible) AFTER the actions, before snapshotting — deterministic wait for late-rendering toasts/modals instead of guessing settle_ms. | |
| include_click_targets | No | Opt-in heuristic: also include cursor:pointer elements with content that match no other rule (JS-click product cards without anchors/roles/test-ids). Heuristic nodes carry a context_note. |