electron-agent-bridge
    Preparing search index...
    • Turn recorded actions (record.events) into a flow: one act step per action, in order. The page most actions happened in becomes the flow's target; others get their own. Typing collapses into the field's last value, a click followed by its double click into one double click, and password fields read their value from an environment variable (${env.FLOW_SECRET_1}…) instead of the recording.

      Parameters

      • events: readonly {
            action:
                | {
                    button?: "left"
                    | "right"
                    | "middle";
                    clickCount?: number;
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    modifiers?: ("Alt" | "Control" | "Meta" | "Shift")[];
                    type: "click";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "hover";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "fill";
                    value: string;
                }
                | {
                    fields: {
                        locator: {
                            css?: string;
                            exact?: boolean;
                            name?: string;
                            nth?: number;
                            ref?: string;
                            role?: string;
                            text?: string;
                        };
                        value: string
                        | boolean
                        | string[];
                    }[];
                    type: "fillForm";
                }
                | {
                    locator?: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    text: string;
                    type: "type";
                }
                | {
                    key: string;
                    locator?: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "press";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "check";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "uncheck";
                }
                | {
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "select";
                    values: string[];
                }
                | {
                    deltaX?: number;
                    deltaY?: number;
                    locator?: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "scroll";
                }
                | {
                    files: string[];
                    locator: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "upload";
                }
                | {
                    from: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    to: {
                        css?: string;
                        exact?: boolean;
                        name?: string;
                        nth?: number;
                        ref?: string;
                        role?: string;
                        text?: string;
                    };
                    type: "drag";
                };
            secret?: boolean;
            seq: number;
            source: "user"
            | "agent";
            target: string;
            ts: number;
            url?: string;
        }[]
      • options: RecordingToFlowOptions

      Returns RecordedFlow