Wait for Prompt

Waits a period of time to find a command prompt connected to an SSH 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.

terminalWaitPrompt [--timeout(TimeSpan)] (String)=value


Connect to a terminal using the Connect to Terminal via SSH (terminalSshConnect) command.

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
Timeout timeout Optional Time Span, Number, Text Maximum wait time to find a command prompt open on the connected terminal.

Note:If no value is defined for the Timeout parameter, the bot uses the context timeout defined by the Set Timeout (setTimeout) command. If that command is not used on the script, the default timeout is 5 seconds.

Output parameters

Designer mode label Script mode name Accepted variable types Description
Result value Text Text with the result of the execution.


The Connect to Terminal via SSH command connects to an SSH terminal; then the Wait for Prompt command waits for a prompt for this terminal to appear, according to the time defined in the Timeout parameter (00:00:00.0100000). Finally, Disconnect from Terminal disconnects from the terminal.

defVar --name terminalName --type String --value nomeTerminal
defVar --name terminalServer --type String --value serverSSHAddress
defVar --name serverPort --type Numeric --value 23
defVar --name promptResult --type String
defVar --name sshConection --type Boolean
terminalSshConnect --name "${terminalName}" --host "${terminalServer}" --username username --password password --port ${promptResult} sshConection=value
terminalWaitPrompt --timeout 00:00:00.0100000 promptResult=value
terminalDisconnect --name "${terminalName}"
logMessage --message "Result: ${promptResult}" --type "Info"
Remember:Use a valid connection to connect to the server.