Skip to main content

TypeScript Types

Key TypeScript interfaces and types used throughout the Agent Browser SDK.

Command Types

LaunchCommand

Configuration for browser launch.
Navigation command.

ClickCommand

Click interaction.

TypeCommand

Type text into an element.

FillCommand

Fill an input field.

ScreenshotCommand

Capture screenshot.

SnapshotCommand

Get accessibility snapshot.

EvaluateCommand

Execute JavaScript.

WaitCommand

Wait for element or timeout.

ScrollCommand

Scroll the page.

Snapshot Types

EnhancedSnapshot

Accessibility snapshot with refs.

RefMap

Map of element refs to locator data.

SnapshotOptions

Configuration for snapshot generation.

Response Types

SuccessResponse

Successful command response.

ErrorResponse

Error command response.

Response

Union of success and error responses.
Navigation result data.

ScreenshotData

Screenshot result data.

Annotation

Element annotation for screenshots.

SnapshotData

Snapshot result data.

TabListData

Tab list information.

Screencast Types

ScreencastFrame

Screencast frame data from CDP.

ScreencastOptions

Screencast configuration.

Tracing Types

TraceEvent

Chrome trace event (CDP profiler format).

iOS Types

IOSDeviceInfo

iOS device information.

IOSEnhancedSnapshot

iOS snapshot with refs.

IOSRefMap

iOS ref map.

Diff Types

DiffSnapshotData

Snapshot diff result.

DiffScreenshotData

Screenshot diff result.

DiffUrlData

URL comparison result.

CookiesSetCommand

Set cookies command.

StorageGetCommand

Get storage value.

StorageSetCommand

Set storage value.

Route & Request Types

RouteCommand

Intercept and mock requests.

RequestsCommand

Get tracked requests.

State Management Types

StateListCommand

List saved session states.

StateClearCommand

Clear session states.

AuthSaveCommand

Save authentication credentials.

Input Types

InputMouseCommand

Mouse input event.

InputKeyboardCommand

Keyboard input event.

InputTouchCommand

Touch input event.

Importing Types

Import types from the package: