import { Driver } from '.'; /** * A wrapper class for Driver with high level API for CLI interactions */ export declare class InteractionHelper { protected client: Driver; constructor(client: Driver); destroy(): void; commandTaking(ms: number, exitCode?: number, stdout?: string, stderr?: string): string; execCommandTaking(ms: number, exitCode?: number, stdout?: string, stderr?: string): Promise; getStrippedALlData(): Promise; clear(): Promise; /** * Returns last process exit code or undefined if not possible. IMPORTANT: relies on `$?` and `echo` so most * probably only works in unix (tested on macOs and Linux). * * This is useful on interactive applications that inquire some data and finally do some processing, in which * they could fail with an excepiton. no matter if the processing takes time, we enter `echo $?` commands with an * identifier that will be only executed after the application exits returning its exit code. * * However notice that while the app is running, althouhg not executed we are still writing to its stdin so use * it when you know the app is no longer litening for relevant data, just makind final processing and exit, this * is by waiting some time or in those cases where a key combination was presend to exit (q). * * TODO: example with "more" command */ getLastExitCode(): Promise; waitForStrippedDataToInclude(s: string): Promise; data: (s: string) => Promise; }