Interface: ShellApi
@termwright/driver / ShellApi
Interface: ShellApi
Section titled “Interface: ShellApi”Defined in: driver/src/api.ts:395
@termwright/driver — PTY + VT sessions, locators, actions and waits.
The normative public API lives in api.ts; this module is the only entry
point and re-exports the types from there together with their runtime
implementations.
Example
Section titled “Example”import { launchTerminal } from '@termwright/driver';
const terminal = await launchTerminal({ command: ['node', 'app.js'] });await terminal.waitForText('Ready');await terminal.getByRole('button', { name: 'Approve' }).activate();await terminal.close();Methods
Section titled “Methods”run(
command,options?):Promise<ShellCommandResult>
Defined in: driver/src/api.ts:398
Parameters
Section titled “Parameters”command
Section titled “command”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<ShellCommandResult>
status()
Section titled “status()”status():
ShellStatus
Defined in: driver/src/api.ts:396
Returns
Section titled “Returns”waitForPrompt()
Section titled “waitForPrompt()”waitForPrompt(
options?):Promise<void>
Defined in: driver/src/api.ts:397
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<void>