Terminal Contains

Checks for any text on a connected terminal.

Command availability: IBM RPA SaaS and IBM RPA on premises

Script syntax

IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.

terminalContains --text(String) (Boolean)=value


Use one of the following commands to connect to a Terminal:

Input parameters

The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.

Designer mode label Script mode name Required Accepted variable types Description
Text text Required Text Text that should be checked on the connected terminal.

Output parameters

Designer mode label Script mode name Accepted variable types Description
Value value Boolean Returns True if the connected terminal contains Text, or False otherwise.


This command checks the terminal for the text "Welcome to the Example.com terminal!".

defVar --name terminalConnected --type Boolean
defVar --name value --type Boolean
defVar --name containsValue --type Boolean
terminalConnect --name terminal --hostname "example.com" --port 23 --timeout 00:01:00 terminalConnected=value
terminalContains --text "Welcome to the Example.com terminal! " containsValue=value
logMessage --message "${containsValue}" --type "Info"
terminalDisconnect --name terminal
// Result: `True`
Remember:Use a valid connection to connect to the server.