import { TraceClient } from "@empiricalrun/llm"; import OpenAI from "openai"; import { TestGenPage } from "../page"; export type { TestGenPage }; export type PlaywrightActionGenerator = (page: TestGenPage, options: { stateVariables: Record; setStateVariables: (stateVariables: Record) => void; }) => Action; export type ActionSchema = OpenAI.Chat.Completions.ChatCompletionTool; export type Action = { name: string; schema: ActionSchema; execute: (options: { args: T; trace?: TraceClient; }) => Promise<{ locator: string; testCaseLine?: string; } | void>; template: (args: T, options: { locator: string; testCaseLine?: string; }) => { code: string; importPath?: string; }; }; export type ScopeVars = Record; export type BaseActionArgs = { reason: string; elementAnnotation?: string; }; export type ClickActionArgs = BaseActionArgs & { xpath: string; css_selector: string; }; export type FillActionArgs = BaseActionArgs & { text: string; variable_name: string; xpath: string; css_selector: string; }; export type GotoActionArgs = BaseActionArgs & { url: string; }; export type PressActionArgs = BaseActionArgs & { key: string; xpath: string; css_selector: string; }; export type AssertTextVisibilityActionArgs = BaseActionArgs & { xpath: string; css_selector: string; }; export type TextContentActionArgs = BaseActionArgs & { variable_name: string; xpath: string; css_selector: string; }; export type HoverActionArgs = BaseActionArgs & { xpath: string; css_selector: string; }; export type SkillActionArgs = BaseActionArgs & { skill: string; action: string; }; export type ActionArgs = ClickActionArgs | FillActionArgs | GotoActionArgs | PressActionArgs | AssertTextVisibilityActionArgs | TextContentActionArgs | HoverActionArgs | SkillActionArgs; //# sourceMappingURL=index.d.ts.map