@presidio-dev/factifai-agent
Version:
An AI powered browser automation testing agent powered by LLMs.
43 lines • 1.92 kB
TypeScript
/**
* Script generation types
*/
export declare enum ScriptType {
COORDINATE = "coordinate-based",
SELECTOR = "selector-based"
}
/**
* Script output formats
*/
export declare enum ScriptFormat {
SPEC = "spec",// Traditional .spec.ts format for Playwright test runner
MODULE = "module"
}
/**
* Generate a Playwright script from test execution data using coordinates
* @param sessionId The session ID
* @param actions The recorded actions with timestamps
* @param format The output format (spec or module)
* @param scriptName Optional name for the exported function (used in module format)
* @returns Promise with the generated script
*/
export declare function generatePlaywrightCoordinateScript(_sessionId: string, actions: any[], format?: ScriptFormat, scriptName?: string): Promise<string>;
/**
* Generate a Playwright script from test execution data using selectors/locators
* @param sessionId The session ID
* @param actions The recorded actions with timestamps
* @param format The output format (spec or module)
* @param scriptName Optional name for the exported function (used in module format)
* @returns Promise with the generated script
*/
export declare function generatePlaywrightSelectorScript(_sessionId: string, actions: any[], format?: ScriptFormat, scriptName?: string): Promise<string>;
/**
* Save a generated Playwright script to the scripts/tests directory
* @param sessionId The session ID
* @param script The generated script content
* @param type The type of script (coordinate or selector)
* @param format The script format (spec or module)
* @param scriptName Optional custom name for the script file
* @returns The path to the saved script file
*/
export declare function savePlaywrightScript(sessionId: string, script: string, type?: ScriptType, format?: ScriptFormat, scriptName?: string): string;
//# sourceMappingURL=llm-script-generator.d.ts.map