/** * Converts raw DB Element records (role, meaning, notes JSON) into Playwright-idiomatic locator strings. * Priority: data-testid → aria-label/placeholder (inputs) → role+name (buttons/links) → heading → text → id */ export interface PlaywrightLocator { key: string; expression: string; elementType: string; confidence: 'high' | 'medium' | 'low'; source: 'testid' | 'label' | 'placeholder' | 'role-name' | 'heading' | 'text' | 'id'; description: string; } /** Convert a single DB Element record to a Playwright locator. Returns null if insufficient data. */ export declare function elementToPlaywrightLocator(element: { role?: string | null; meaning?: string | null; text?: string | null; notes?: unknown; selector?: string | null; ariaState?: Record | null; }): PlaywrightLocator | null; /** * Convert an array of DB Element records to deduplicated Playwright locators. * Deduplicates by key — higher confidence wins. * Filters out crawl-analysis meta-annotations and produces an auth-wall warning when applicable. */ export declare function elementsToPlaywrightLocators(elements: Array<{ role?: string | null; meaning?: string | null; text?: string | null; notes?: unknown; selector?: string | null; isInteractive?: boolean | null; ariaState?: Record | null; }>): PlaywrightLocator[]; /** * Detect whether a set of locators was extracted from an auth-wall page. * Returns a warning message if auth-wall detected, null otherwise. * Heuristic: >50% of locators are low-confidence text matches AND at least one matches auth-wall pattern. */ export declare function detectAuthWallLocators(locators: PlaywrightLocator[]): string | null; /** * Format locators as a block for injection into LLM script generation prompts. * Returns empty string if no locators. */ export declare function formatLocatorsForPrompt(locators: PlaywrightLocator[]): string;