askui
Version:
Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on
33 lines (32 loc) • 1.66 kB
TypeScript
import WebSocket from 'ws';
import { DetectedElement } from '../core/model/annotation-result/detected-element';
import { CaptureScreenshotResponse, ControlResponse, StartRecordingResponse, StopRecordingResponse, ReadRecordingPartResponse, InteractiveAnnotationResponse, GetProcessPidResponse, GetStartingArgumentsResponse } from '../core/runner-protocol';
import { ControlCommand } from '../core/ui-control-commands';
import { UiControllerClientConnectionState } from './ui-controller-client-connection-state';
export declare class UiControllerClient {
url: string;
private static readonly EMPTY_REJECT;
private static readonly EMPTY_RESOLVE;
private static readonly REQUEST_TIMEOUT_IN_MS;
ws: WebSocket;
connectionState: UiControllerClientConnectionState;
private timeout?;
private currentReject;
private currentResolve;
constructor(url: string);
private clearResponse;
private onMessage;
connect(): Promise<UiControllerClientConnectionState>;
disconnect(): void;
private checkConnection;
private sendAndReceive;
private send;
requestScreenshot(): Promise<CaptureScreenshotResponse>;
getStartingArguments(): Promise<GetStartingArgumentsResponse>;
getServerPid(): Promise<GetProcessPidResponse>;
startVideoRecording(): Promise<StartRecordingResponse>;
stopVideoRecording(): Promise<StopRecordingResponse>;
readVideoRecording(): Promise<ReadRecordingPartResponse>;
annotateInteractively(boundingBoxes: DetectedElement[], imageString: string): Promise<InteractiveAnnotationResponse>;
requestControl(controlCommand: ControlCommand): Promise<ControlResponse>;
}