Skip to main content

Terminal Wait For

Waits until the terminal shows one of the given texts and returns which one matched, or fails when a failure text appears or the timeout expires.

Category: Terminal Sessions (SSH) · Group: Terminal · Activity name: TerminalWaitFor

Example​

outputVariable = TerminalWaitFor("<session>", [], failOn=[], scope="screen", timeout=30000, settle=150)

Inputs​

NameTypeRequiredDefaultDescription
Session VariablereferenceYesThe variable where the terminal session was stored by Terminal Open.
Any OfarrayYesTexts to wait for; the first one found wins.
Fail OnarrayTexts that fail the step as soon as they appear (e.g. locked by).
Scopestringscreenscreen is the visible screen; scrollback also includes lines that have scrolled off it. One of: screen, scrollback.
Timeout (ms)integer30000How long to wait before failing.
Settle (ms)integer150How long the output must stay quiet after a match, so a half-drawn screen is never returned.

Outputs​

NameTypeDescription
outputVariablejsonStores matched (the text found), index (its position in Any Of), and screen.