testgenius-ai
Version:
๐ TestGenius AI - The Ultimate E2E Testing Framework for Everyone | No Coding Required โข AI-Powered Automation โข Beautiful Reports โข Zero Complexity
47 lines โข 1.11 kB
TypeScript
import { Browser } from 'webdriverio';
export interface ElementMatch {
element: any;
confidence: number;
strategy: string;
selector: string;
}
export interface DetectionStrategy {
name: string;
priority: number;
selectors: string[];
description: string;
}
export declare class SmartElementDetector {
private browser;
private cache;
private pageContext;
constructor(browser: Browser);
/**
* ๐ Fast element detection with multiple strategies
*/
detectElement(description: string, elementType?: string): Promise<ElementMatch | null>;
/**
* ๐ฏ Generate detection strategies (Fast, no AI)
*/
private generateStrategies;
/**
* โก Try a specific strategy
*/
private tryStrategy;
/**
* ๐ Calculate confidence score
*/
private calculateConfidence;
/**
* ๐งน Clear cache
*/
clearCache(): void;
/**
* ๐ Get cache statistics
*/
getCacheStats(): {
size: number;
hitRate: number;
};
}
//# sourceMappingURL=SmartElementDetector.d.ts.map