import type { Locator, Page } from 'playwright-core'; import type { BrowserElementRef, BrowserSnapshot, CardFieldGuard } from './browser-types.js'; export declare class StaleElementError extends Error { readonly fix: string; constructor(message: string, fix: string); } /** Snapshots taken per page, so a ref can only be used against the page that produced it. */ export declare class SnapshotStore { private readonly snapshots; set(snapshot: BrowserSnapshot): void; get(sessionId: string, pageId: string): BrowserSnapshot | null; clear(sessionId: string, pageId: string): void; } /** * Snapshots are a read path back to a card number, and this is where it closes. * * `payments.checkout.fillCard` has the daemon type the owner's card into a * page so the model never holds it. Ten seconds later the model can call * `action:"snapshot"` and read `value` off every form control on that page, * including the one just filled. Without the two steps below, the containment * is theatre. * * STRUCTURAL a control the page itself declares to be a payment field * never reports a value, filled or not, guard or no guard. * VALUE-BASED while material is live, the exact strings typed are removed * from every name and value reported, wherever they appear. * * Both, because each covers the other's gap: the classification is defeated by * a page that misnames its fields, and the value matching only exists when a * guard is installed, which is why the fill refuses to run without one. */ export declare function takeSnapshot(page: Page, sessionId: string, pageId: string, options?: { readonly limit?: number | undefined; readonly guard?: CardFieldGuard | undefined; }): Promise; /** * Turns a ref into a live locator, refusing when the page has moved on. * * A ref that no longer resolves, or resolves to a different element than the * snapshot recorded, fails with an instruction to re-snapshot. Acting on a * position alone is how automation clicks the wrong thing. */ export declare function resolveRef(page: Page, snapshot: BrowserSnapshot | null, ref: string): Promise<{ readonly locator: Locator; readonly element: BrowserElementRef; }>; //# sourceMappingURL=browser-snapshot.d.ts.map