Documentation
¶
Overview ¶
Generated by cargo run -p tui-test-bindgen. Do not edit.
Generated by cargo run -p tui-test-bindgen. Do not edit.
Index ¶
- func CloseAll() error
- func Milliseconds(timeout time.Duration) (uint64, error)
- func Recording(session string) (string, error)
- func Sessions() ([]string, error)
- type ArtifactOptions
- type AutomaticRecording
- type Backend
- type BellEvent
- type Cell
- type ClipboardWaitOptions
- type Color
- type Colors
- type Cursor
- type Direction
- type EffectiveTimeouts
- type Error
- type ErrorKind
- type LocatorClickOptions
- type LocatorExpectOptions
- type LocatorExpression
- type LocatorNode
- type MouseButton
- type MouseButtonOptions
- type MouseClickOptions
- type OpenOptions
- type OpenResult
- type Profile
- type RecordingFormat
- type RecordingMode
- type RecordingOptions
- type ScreenshotOptions
- type ScrollDirection
- type Session
- func (runtime *Session) Cells(column, row, width, height uint16) ([]Cell, error)
- func (runtime *Session) ClickLocator(expression LocatorExpression, options LocatorClickOptions) error
- func (runtime *Session) Close(failed *bool) error
- func (runtime *Session) ExpectBellCount(count uint64, timeout *time.Duration) error
- func (runtime *Session) ExpectExitCode(code int32, timeout *time.Duration) error
- func (runtime *Session) ExpectLocator(expression LocatorExpression, options LocatorExpectOptions) error
- func (runtime *Session) ExpectOutput(text string, regex bool) error
- func (runtime *Session) ExpectTitle(text string, options TitleOptions) error
- func (runtime *Session) FindLocator(expression LocatorExpression, requireOne bool) ([]TextMatch, error)
- func (runtime *Session) GetBellCount() (uint64, error)
- func (runtime *Session) GetBellEvents() ([]BellEvent, error)
- func (runtime *Session) GetClipboard() (string, error)
- func (runtime *Session) GetCommand() (*string, error)
- func (runtime *Session) GetCursor() (Cursor, error)
- func (runtime *Session) GetCwd() (*string, error)
- func (runtime *Session) GetExitCode() (*int32, error)
- func (runtime *Session) GetOutput() (*string, error)
- func (runtime *Session) GetSize() (Size, error)
- func (runtime *Session) GetTitle() (*string, error)
- func (runtime *Session) GetViewport() (Viewport, error)
- func (runtime *Session) HighlightLocator(expression LocatorExpression, timeout *time.Duration) error
- func (runtime *Session) Key(keys []string, action uint32) error
- func (runtime *Session) MouseClick(options MouseClickOptions) error
- func (runtime *Session) MouseDown(column, row uint16, options MouseButtonOptions) error
- func (runtime *Session) MouseDrag(x1, y1, x2, y2 uint16, options MouseButtonOptions) error
- func (runtime *Session) MouseMove(column, row uint16) error
- func (runtime *Session) MouseScroll(direction ScrollDirection, amount uint32) error
- func (runtime *Session) MouseUp(column, row uint16, options MouseButtonOptions) error
- func (runtime *Session) Open(options OpenOptions) (OpenResult, error)
- func (runtime *Session) Resize(cols, rows uint16) error
- func (runtime *Session) Restart(gracefulTimeout time.Duration) (OpenResult, error)
- func (runtime *Session) Run(program string, args []string, options SpawnOptions) (OpenResult, error)
- func (runtime *Session) Screenshot(path string, options ScreenshotOptions) (string, error)
- func (runtime *Session) Scroll(lines int32) error
- func (runtime *Session) ScrollToBottom() error
- func (runtime *Session) ScrollToTop() error
- func (runtime *Session) Signal(text string) error
- func (runtime *Session) Snapshot(name string, options SnapshotOptions) (SnapshotResult, error)
- func (runtime *Session) StartRecording(path string, options RecordingOptions) error
- func (runtime *Session) State() (State, error)
- func (runtime *Session) StopRecording() (string, error)
- func (runtime *Session) Submit(text *string) error
- func (runtime *Session) Text(full bool) (string, error)
- func (runtime *Session) TypeText(text string) error
- func (runtime *Session) WaitBell(timeout *time.Duration) error
- func (runtime *Session) WaitClipboard(options ClipboardWaitOptions) error
- func (runtime *Session) WaitCommand(timeout *time.Duration) error
- func (runtime *Session) WaitExit(timeout *time.Duration) error
- func (runtime *Session) WaitIdle(timeout *time.Duration) error
- func (runtime *Session) WaitLocator(expression LocatorExpression, hidden bool, timeout *time.Duration) error
- func (runtime *Session) WaitReady(timeout *time.Duration) error
- func (runtime *Session) WaitTitle(text string, options TitleOptions) error
- func (runtime *Session) Write(text string) error
- type SessionOptions
- type Shell
- type Size
- type SnapshotOptions
- type SnapshotResult
- type SpawnOptions
- type State
- type TerminalColors
- type TextMatch
- type TextPosition
- type TextSpan
- type TextStyle
- type Timeouts
- type TitleOptions
- type TraceOptions
- type UnderlineStyle
- type Viewport
- type Whitespace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactOptions ¶
type AutomaticRecording ¶
type AutomaticRecording struct {
Mode RecordingMode
Directory string
}
type ClipboardWaitOptions ¶
type EffectiveTimeouts ¶
type LocatorClickOptions ¶
type LocatorClickOptions struct {
MouseButtonOptions
Clicks *uint32
Timeout *time.Duration
}
type LocatorExpectOptions ¶
type LocatorExpression ¶
type LocatorExpression struct {
Nodes []LocatorNode `json:"nodes"`
Root uint32 `json:"root"`
}
type LocatorNode ¶
type LocatorNode struct {
Kind string `json:"kind"`
Text *string `json:"text,omitempty"`
Regex *bool `json:"regex,omitempty"`
Whitespace *Whitespace `json:"whitespace,omitempty"`
Style *TextStyle `json:"style,omitempty"`
Link *string `json:"link,omitempty"`
Full *bool `json:"full,omitempty"`
Direction *Direction `json:"direction,omitempty"`
Within *uint32 `json:"within,omitempty"`
Left *uint32 `json:"left,omitempty"`
Right *uint32 `json:"right,omitempty"`
Input *uint32 `json:"input,omitempty"`
Has *uint32 `json:"has,omitempty"`
HasNot *uint32 `json:"has_not,omitempty"`
Occurrence any `json:"occurrence"`
}
type MouseButton ¶
type MouseButton string
const ( Left MouseButton = "left" Middle MouseButton = "middle" Right MouseButton = "right" )
type MouseButtonOptions ¶
type MouseButtonOptions struct {
Button MouseButton
Alt, Ctrl, Shift bool
}
type MouseClickOptions ¶
type MouseClickOptions struct {
MouseButtonOptions
X, Y *uint16
OnText *string
Clicks *uint32
}
type OpenOptions ¶
type OpenOptions struct {
SpawnOptions
Shell Shell
}
type OpenResult ¶
type RecordingFormat ¶
type RecordingFormat string
const ( APNG RecordingFormat = "apng" GIF RecordingFormat = "gif" MP4 RecordingFormat = "mp4" Cast RecordingFormat = "cast" )
type RecordingMode ¶
type RecordingMode string
const ( RecordingDisabled RecordingMode = "disabled" RecordingOnFailure RecordingMode = "on-failure" RecordingAlways RecordingMode = "always" )
type RecordingOptions ¶
type RecordingOptions struct {
Format RecordingFormat
FPS *uint32
Speed, IdleTimeLimit, Zoom *float64
Background string
Transparent bool
}
type ScreenshotOptions ¶
type ScrollDirection ¶
type ScrollDirection string
const ( Up ScrollDirection = "up" Down ScrollDirection = "down" )
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(name string, options SessionOptions) (*Session, error)
func (*Session) ClickLocator ¶
func (runtime *Session) ClickLocator(expression LocatorExpression, options LocatorClickOptions) error
func (*Session) ExpectBellCount ¶
func (*Session) ExpectExitCode ¶
func (*Session) ExpectLocator ¶
func (runtime *Session) ExpectLocator(expression LocatorExpression, options LocatorExpectOptions) error
func (*Session) ExpectTitle ¶
func (runtime *Session) ExpectTitle(text string, options TitleOptions) error
func (*Session) FindLocator ¶
func (runtime *Session) FindLocator(expression LocatorExpression, requireOne bool) ([]TextMatch, error)
func (*Session) GetBellCount ¶
func (*Session) GetBellEvents ¶
func (*Session) GetClipboard ¶
func (*Session) GetCommand ¶
func (*Session) GetExitCode ¶
func (*Session) GetViewport ¶
func (*Session) HighlightLocator ¶
func (runtime *Session) HighlightLocator(expression LocatorExpression, timeout *time.Duration) error
func (*Session) MouseClick ¶
func (runtime *Session) MouseClick(options MouseClickOptions) error
func (*Session) MouseDown ¶
func (runtime *Session) MouseDown(column, row uint16, options MouseButtonOptions) error
func (*Session) MouseDrag ¶
func (runtime *Session) MouseDrag(x1, y1, x2, y2 uint16, options MouseButtonOptions) error
func (*Session) MouseScroll ¶
func (runtime *Session) MouseScroll(direction ScrollDirection, amount uint32) error
func (*Session) MouseUp ¶
func (runtime *Session) MouseUp(column, row uint16, options MouseButtonOptions) error
func (*Session) Open ¶
func (runtime *Session) Open(options OpenOptions) (OpenResult, error)
func (*Session) Restart ¶
func (runtime *Session) Restart(gracefulTimeout time.Duration) (OpenResult, error)
func (*Session) Run ¶
func (runtime *Session) Run(program string, args []string, options SpawnOptions) (OpenResult, error)
func (*Session) Screenshot ¶
func (runtime *Session) Screenshot(path string, options ScreenshotOptions) (string, error)
func (*Session) ScrollToBottom ¶
func (*Session) ScrollToTop ¶
func (*Session) Snapshot ¶
func (runtime *Session) Snapshot(name string, options SnapshotOptions) (SnapshotResult, error)
func (*Session) StartRecording ¶
func (runtime *Session) StartRecording(path string, options RecordingOptions) error
func (*Session) StopRecording ¶
func (*Session) WaitClipboard ¶
func (runtime *Session) WaitClipboard(options ClipboardWaitOptions) error
func (*Session) WaitLocator ¶
type SessionOptions ¶
type SessionOptions struct {
Recording *AutomaticRecording
Artifacts *ArtifactOptions
Trace *TraceOptions
ScreenHistoryLimit *uint16
}
type SnapshotOptions ¶
type SnapshotResult ¶
type SnapshotResult string
const ( SnapshotPassed SnapshotResult = "passed" SnapshotWritten SnapshotResult = "written" SnapshotUpdated SnapshotResult = "updated" )
type SpawnOptions ¶
type TerminalColors ¶
type TextMatch ¶
type TextMatch struct {
Text string
Start, End TextPosition
Spans []TextSpan
}
type TextPosition ¶
type TextPosition struct{ Row, Column uint32 }
type TextStyle ¶
type TextStyle struct {
Foreground *string `json:"foreground,omitempty"`
Background *string `json:"background,omitempty"`
Bold *bool `json:"bold,omitempty"`
Dim *bool `json:"dim,omitempty"`
Italic *bool `json:"italic,omitempty"`
UnderlineStyle *UnderlineStyle `json:"underline_style,omitempty"`
UnderlineColor *string `json:"underline_color,omitempty"`
Inverse *bool `json:"inverse,omitempty"`
Hidden *bool `json:"hidden,omitempty"`
Strikethrough *bool `json:"strikethrough,omitempty"`
Blink *bool `json:"blink,omitempty"`
}
type TitleOptions ¶
type TraceOptions ¶
type TraceOptions struct {
Mode, Directory string
}
type UnderlineStyle ¶
type UnderlineStyle string
const ( UnderlineNone UnderlineStyle = "none" UnderlineSingle UnderlineStyle = "single" UnderlineDouble UnderlineStyle = "double" UnderlineCurly UnderlineStyle = "curly" UnderlineDotted UnderlineStyle = "dotted" UnderlineDashed UnderlineStyle = "dashed" )
type Whitespace ¶
type Whitespace string
const ( Exact Whitespace = "exact" Normalize Whitespace = "normalize" )
Click to show internal directories.
Click to hide internal directories.