UNPKG

@focusconsulting/auto-a11y

Version:

A powerful tool that combines AI with accessibility-first element selection for Playwright tests

27 lines (26 loc) 950 B
import { TestInfo } from "@playwright/test"; import { LocatorQuery } from "./locator-schema"; /** * Class to manage saving and loading locator snapshots */ export declare class SnapshotManager { private snapshotFilePath; constructor(snapshotFilePath: string | null); /** * Creates a snapshot file path based on test information * @param testInfo Playwright TestInfo object * @returns Path to the snapshot file */ static createSnapshotPath(testInfo: TestInfo): string; /** * Reads locator snapshots from the snapshot file * @returns Object containing saved locators or empty object if file doesn't exist */ readSnapshots(): Record<string, LocatorQuery>; /** * Saves a locator to the snapshot file * @param description The element description * @param queryInfo The query information to save */ saveSnapshot(description: string, queryInfo: LocatorQuery): void; }