refactor(automation): remove browser automation, use OS-level automation only
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
import { StepId } from '../../domain/value-objects/StepId';
|
||||
import {
|
||||
NavigationResult,
|
||||
FormFillResult,
|
||||
ClickResult,
|
||||
WaitResult,
|
||||
ModalResult,
|
||||
AutomationResult,
|
||||
} from './AutomationResults';
|
||||
|
||||
export interface IBrowserAutomation {
|
||||
navigateToPage(url: string): Promise<NavigationResult>;
|
||||
fillFormField(fieldName: string, value: string): Promise<FormFillResult>;
|
||||
clickElement(selector: string): Promise<ClickResult>;
|
||||
waitForElement(selector: string, maxWaitMs?: number): Promise<WaitResult>;
|
||||
handleModal(stepId: StepId, action: string): Promise<ModalResult>;
|
||||
|
||||
/**
|
||||
* Execute a complete workflow step with all required browser operations.
|
||||
* Uses IRacingSelectorMap to locate elements and performs appropriate actions.
|
||||
*
|
||||
* @param stepId - The step to execute (1-18)
|
||||
* @param config - Session configuration with form field values
|
||||
* @returns AutomationResult with success/failure and metadata
|
||||
*/
|
||||
executeStep?(stepId: StepId, config: Record<string, unknown>): Promise<AutomationResult>;
|
||||
|
||||
connect?(): Promise<void>;
|
||||
disconnect?(): Promise<void>;
|
||||
isConnected?(): boolean;
|
||||
}
|
||||
@@ -92,8 +92,9 @@ export interface IScreenAutomation {
|
||||
|
||||
/**
|
||||
* Initialize the automation connection.
|
||||
* Returns an AutomationResult indicating success or failure.
|
||||
*/
|
||||
connect?(): Promise<void>;
|
||||
connect?(): Promise<AutomationResult>;
|
||||
|
||||
/**
|
||||
* Clean up resources.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { AutomationSession } from '../../domain/entities/AutomationSession';
|
||||
import { HostedSessionConfig } from '../../domain/entities/HostedSessionConfig';
|
||||
import { IAutomationEngine } from '../ports/IAutomationEngine';
|
||||
import { IBrowserAutomation } from '../ports/IBrowserAutomation';
|
||||
import type { IBrowserAutomation } from '../ports/IScreenAutomation';
|
||||
import { ISessionRepository } from '../ports/ISessionRepository';
|
||||
|
||||
export interface SessionDTO {
|
||||
|
||||
Reference in New Issue
Block a user