/** * dom-analyzer.ts * * Extracts a structured description of all meaningful elements from the live * browser page — entirely locally, without any AI calls. * * The analyzer walks the page's DOM inside Playwright's page.evaluate() context * and collects interactive elements (buttons, inputs, links, tables, dialogs, * navigation items, etc.) into a typed PageAnalysis object. This object is * passed downstream to the skill orchestrator so that each skill can make * locator and assertion decisions without ever looking at raw HTML. * * Role in the overall flow: * pwpilot_analyze_page → DOMAnalyzer.analyze() → PageAnalysis → SkillOrchestrator */ import { Page } from 'playwright'; import { PageAnalysis } from '../types'; /** * Inspects a live browser page and produces a categorized summary of its * interactive elements: forms, navigation links, tables, and popups. */ export declare class DOMAnalyzer { /** * Analyze the current state of the given page and return a PageAnalysis * containing categorized lists of DOM elements. * * @param page - The live Playwright page to analyze. * @returns A PageAnalysis with the page URL, title, and categorized element lists. */ analyze(page: Page): Promise; /** * Run a DOM traversal inside the browser page and return all meaningful * interactive elements as plain DOMElement objects. * * Deduplication is performed using a composite key of tag + identifying text/label * so each logical element appears only once even if matched by multiple CSS selectors. * * @param page - The Playwright page to evaluate inside. * @returns An array of DOMElement objects representing every distinct interactive element found. */ private extractAll; } //# sourceMappingURL=dom-analyzer.d.ts.map