Find Text
Finds a text in the terminal and returns the Cartesian coordinate system point that is the first occurrence of that text.
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.
terminalFindText --text(String) (Boolean)=success (Point)=value
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 to be found on the terminal. |
Output parameters
Designer mode label | Script mode name | Accepted variable types | Description |
---|---|---|---|
Success | success | Boolean |
Returns True if text was found or False otherwise. |
Point | value | Point |
Returns the position where the text is in the terminal as a coordinate (Column, Row). The position starts in the upper left corner with (Column 1, Row 1). |
Example
Gets the coordinate point of the first occurrence of the text specified in the terminal.
defVar --name success --type Boolean
defVar --name textPoint --type Point
defVar --name terminalConnect --type Boolean
// Connect to the terminal.
terminalConnect --name terminal --hostname "example.com" --port 23 --timeout 00:00:01 terminalConnect=value
terminalFindText --text System success=success textPoint=value
// Prints the coordinate point of the text, and if it was successful or not.
logMessage --message "${success}\r\n${textPoint}" --type "Info"
// Disconnect from the terminal.
terminalDisconnect --name terminal