This commit is contained in:
Chris Tate
2026-01-10 13:06:36 -06:00
parent 55d40e1dba
commit ff05842fd8
5 changed files with 333 additions and 4 deletions
+67 -1
View File
@@ -386,6 +386,63 @@ export interface BringToFrontCommand extends BaseCommand {
action: 'bringtofront';
}
// Wait for JS function to return truthy
export interface WaitForFunctionCommand extends BaseCommand {
action: 'waitforfunction';
expression: string;
timeout?: number;
}
// Scroll element into view
export interface ScrollIntoViewCommand extends BaseCommand {
action: 'scrollintoview';
selector: string;
}
// Add init script (runs on every navigation)
export interface AddInitScriptCommand extends BaseCommand {
action: 'addinitscript';
script: string;
}
// Keyboard down/up (hold keys)
export interface KeyDownCommand extends BaseCommand {
action: 'keydown';
key: string;
}
export interface KeyUpCommand extends BaseCommand {
action: 'keyup';
key: string;
}
// Insert text (without key events)
export interface InsertTextCommand extends BaseCommand {
action: 'inserttext';
text: string;
}
// Multi-select dropdown
export interface MultiSelectCommand extends BaseCommand {
action: 'multiselect';
selector: string;
values: string[];
}
// Wait for download
export interface WaitForDownloadCommand extends BaseCommand {
action: 'waitfordownload';
path?: string;
timeout?: number;
}
// Get response body from intercepted request
export interface ResponseBodyCommand extends BaseCommand {
action: 'responsebody';
url: string;
timeout?: number;
}
// Video recording
export interface VideoStartCommand extends BaseCommand {
action: 'video_start';
@@ -760,7 +817,16 @@ export type Command =
| MouseMoveCommand
| MouseDownCommand
| MouseUpCommand
| BringToFrontCommand;
| BringToFrontCommand
| WaitForFunctionCommand
| ScrollIntoViewCommand
| AddInitScriptCommand
| KeyDownCommand
| KeyUpCommand
| InsertTextCommand
| MultiSelectCommand
| WaitForDownloadCommand
| ResponseBodyCommand;
// Response types
export interface SuccessResponse<T = unknown> {