UNPKG

locatai-ts

Version:

Enterprise-grade AI-powered element locator for Selenium WebDriver - TypeScript implementation

45 lines 1.52 kB
/** * Interface for locator cache implementations */ export interface ILocatorCache { /** * Attempts to retrieve cached locators for a given URL, query, and DOM hash * @param url The URL of the page * @param query The natural language query * @param domHash Hash of the page DOM * @returns Array of locator objects if found, empty array otherwise */ tryGet(url: string, query: string, domHash: string): Promise<Array<{ strategy: string; value: string; confidence: number; successRate?: number; }>>; /** * Saves locators to the cache * @param url The URL of the page * @param query The natural language query * @param domHash Hash of the page DOM * @param locators Array of locator objects to cache */ save(url: string, query: string, domHash: string, locators: Array<{ strategy: string; value: string; confidence: number; successRate?: number; }>): Promise<void>; /** * Removes a specific locator from the cache * @param url The URL of the page * @param query The natural language query * @param domHash Hash of the page DOM * @param strategy Locator strategy (css, xpath, etc.) * @param value Locator value */ removeLocator(url: string, query: string, domHash: string, strategy: string, value: string): Promise<void>; /** * Clears the cache */ clear(): Promise<void>; } //# sourceMappingURL=ILocatorCache.d.ts.map