fileforge_page_interaction
Read and act on one open browser page: get text, DOM snapshots, and forms; click, fill, scroll, assert state, and debug selectors. Click and fill can change the real signed-in page.
Instructions
Read and act inside one open page: get text, snapshots and forms, click, fill, scroll, assert, and debug selectors. click and fill act on the real signed-in page, so they can submit or change data. hide_elements lasts until restore_hidden_elements. Use fileforge_qa_testing for repeatable checks across pages and fileforge_scrape_action for structured extraction. Needs the extension.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Link checking mode. | extract_only |
| depth | No | Depth for DOM snapshot | |
| store | No | Save the result in ~/.fileforge and return a ref. | |
| tabId | No | Tab ID, or "active" for the active tab. | active |
| value | No | Value to fill | |
| action | Yes | What to do. Required parameters are in brackets. get_text: Get visible text from a page or selector. get_dom_snapshot: Snapshot the DOM tree. get_layered_snapshot: Layered DOM snapshot with screenshots. get_accessibility_tree: Get the page accessibility tree. get_interactive_elements: List interactive elements on the page. get_forms: Extract forms on the page. wait_for_selector (selector): Wait for a selector to appear. click (selector): Click a selector. fill (selector, value): Fill a form field. scroll: Scroll the page. reveal (selector): Scroll a selector into view. get_element_debug_info (selector): Debug info for an element. hide_elements (selectors): Hide elements matching selectors. restore_hidden_elements: Restore previously hidden elements. extract_article: Extract the article-style main content. compare_visible_vs_article: Compare visible text against extracted article. assert (assertions): Run assertions against page state (url, title, text, selectors, inputs). smoke_test: Quick health check: loaded, text, interactives, errors, images, layout. find_errors: Find visible error text patterns on the page. check_broken_images: Detect broken or unloaded images. check_links: Inspect all anchor links for missing hrefs, javascript:, external, etc. check_layout: Detect layout issues: overflow, zero-size clickables, overlapping elements, modals. debug_selector (selector): Debug a CSS selector: match count, visibility, alternatives, warnings. debug_clickability (selector): Check why an element can or cannot be clicked. capture_debug_bundle: One-call diagnostic bundle: page info, errors, layout, images, links, screenshot. wait_for_page_change: Poll until page state changes (url, title, text, elements) or timeout. compare_snapshots (beforeStateId, afterStateId): Compare two stored page state snapshots by stateId. | |
| amount | No | Scroll distance in pixels. | |
| checks | No | Specific checks to run (smoke_test or check_layout). Defaults apply if omitted. | |
| include | No | Bundle sections: pageInfo, viewport, visibleText, interactiveElements, forms, screenshot, errors, layoutIssues, brokenImages, links. | |
| project | No | Project name that groups stored results. | default |
| fallback | No | Try a simpler method if the first one fails. | |
| selector | No | CSS selector. | |
| direction | No | Scroll direction. | down |
| selectors | No | CSS selectors of the target elements. | |
| timeoutMs | No | Time limit in milliseconds. | |
| assertions | No | List of assertions. Each has: type, value?, selector?, text?, count?. | |
| maxMatches | No | Max matches for find_errors. | |
| changeTypes | No | Which change types to watch. Defaults to all. | |
| maxElements | No | Maximum elements to return. | |
| previousUrl | No | URL to compare the current page against. | |
| afterStateId | No | stateId of the later page state. | |
| maxTextChars | No | Maximum characters of text to return. | |
| beforeStateId | No | stateId of the earlier page state. | |
| includeHidden | No | Include hidden elements in find_errors / check_broken_images / check_links. | |
| maxHtmlLength | No | Maximum HTML length to return. | |
| maxTextLength | No | Maximum text length to return. | |
| includeExternal | No | Include external links. | |
| previousStateId | No | stateId from a previous query_page / smoke_test / capture_debug_bundle. | |
| textSampleLimit | No | Maximum characters in the text sample. | |
| includeSelectors | No | Include CSS selectors for elements. | |
| previousTextHash | No | Text hash to compare the current page against. | |
| includeScreenshotFallback | No | Use a screenshot when text extraction fails. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | False if the action failed or a check did not pass. | |
| ref | No | Stored result ID, for fileforge_result_action. | |
| data | No | The result. Its shape depends on the action. | |
| meta | No | Tool, action and context. | |
| error | No | Failure code and message. | |
| warnings | No | Notes about a call that still ran. |