Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

function libtmux-go latest

WaitForText

WaitForText blocks until some line of the pane's screen contains text.

Source and package
Qualified name
tmuxtest.WaitForText
Package
tmuxtest
Distribution
github.com/libtmux/libtmux-go/tmux
Source
tmux/tmuxtest/screen.go
func WaitForText( ctx context.Context, t testing.TB, pane tmux.Pane, text string, )

Description#

The screen includes the command Type or RunInPane typed, as the terminal echoed it. Wait for text the command prints and the typed line does not contain, or the wait holds before the command has run: after typing "sleep 2; echo READY", wait for a line that is exactly READY with WaitForLine, not for text containing READY.

A pane that never shows text fails the test with the screen it last read.

Parameters
Esc

Type to search.

Reference previewOpen reference