Recording actions on the terminal emulator
Learn how the terminal emulator screen in the recorder works, and how to record screen data based on the actions you take on it. Recording actions also add the equivalent commands automatically to your script.
The terminal emulator screen
IBM RPA Studio's recorder provides a terminal emulator that connects to a terminal host session, and reads and displays the host screen data so you can record the actions that you want to automate, or inspect fields on the screen.
This screen also appears when you debug your script in IBM RPA Studio when you use the IBM RPA internal provider.
The terminal emulator shows the screen of an application in its current state. This screen is what you handle to automate the application.
You can read the screen data by coordinates or index. In general, the screen is organized in coordinates of columns and rows. For actions like moving the cursor or getting a text, you need the column and row of it on the screen to set the right position.
In cases where the screen changes, you need to validate the coordinates to check whether they are still correct. In another hand, indexes are used to identify fields on the screen so you can assign or get values from them.
Navigate around columns and rows, and send keys or texts to the terminal emulator by using the keyboard keys or the Keypad pane. This pane aids you in the actions that you want to run on the terminal emulator screen.
Each key that you press become a command in your script while you record your actions.
Key | Description |
---|---|
PF1 | Send the {F1} key. |
PF2 | Send the {F2} key. |
PF3 | Send the {F3} key. |
PF4 | Send the {F4} key. |
PF5 | Send the {F5} key. |
PF6 | Send the {F6} key. |
PF7 | Send the {F7} key. |
PF8 | Send the {F8} key. |
PF9 | Send the {F9} key. |
PF10 | Send the {F10} key. |
PF11 | Send the {F11} key. |
PF12 | Send the {F12} key. |
Up Arrow | Move the cursor one space or line in the up direction. Send the {UP} key. |
Left Arrow | Move the cursor one space or line in the left direction. Send the {LEFT} key. |
Right Arrow | Move the cursor one space or line in the right direction. Send the {RIGHT} key. |
Down Arrow | Move the cursor one space or line in the down direction. Send the {DOWN} key. |
Home button |
|
PA1 | Send the {PA1} key. |
PA2 | Send the {PA2} key. |
PA3 | Send the {PA3} key. |
Skip backward button | Send the {TAB} key. |
Skip forward button | Send the {BACKTAB} key. |
Clear | Go back to the first screen. Send the {CLEAR} key. |
Reset | Send the {RESET} key. |
Erase EOF | Send the {ERASEEOF} key. |
Erase Input | Erase any input data on the screen. Send the {ERASEINPUT} key. |
Attn | Send the {ATTN} key. |
Break |
|
Enter button | Send the value to the respective field, and the {ENTER} key is not sent. To send the {ENTER} key, go to the Keypad pane and press Enter on the keyboard, or click the Enter button. |
Keyboard button | Assign a value to a field. |
Refresh button | Refresh the terminal screen. |
Common actions
The following sections provide information about common actions that you can run in the terminal emulator.
Moving the cursor to a position
Use the function keys or navigation keys to move the terminal cursor to a specific position on the screen.
You can also add the Set Cursor (terminalSetCursor
) command directly to your script and set the row and column of the position where you
want to move the cursor.
Assigning values to fields and sending texts
Assign a value to a field by using the Keyboard button in the Keypad pane, or add the Assign Value to Field (terminalSetField
)
command directly to the script.
You can also send a text to the terminal with the Send Text to Terminal (terminalSendText
) command. It sends the text to the field in focus
on the terminal emulator screen.
Getting texts and values from fields
Right-click the position on the screen where you want to get a text and select Assign to a variable. It adds the Get Text (terminalGetText
)
command to the script.
You can also get a value from a field on the terminal with the Get Field Value (terminalGetField
) command. It gets the value from a field
according to its index.
Refreshing a terminal emulator screen
Refresh the terminal emulator screen either by using the Refresh button in the Keypad pane, or add the Refresh Terminal (terminalRefresh
) command directly to the script.
Waiting for values from terminal
Wait for values in the terminal emulator screen with the Wait for Terminal Value (terminalWaitFor
) command.
Validating texts on the terminal screen
Right-click the position on the screen where you want to get a text and select Validate this screen with selected text. It adds the Validate Screen (terminalValidateScreen
) command to the script.
Sending keys to the terminal emulator
Send a key to the terminal by using the keys available in the Keypad pane, or add the Send Key to Terminal (terminalSendKey
)
command directly to the script.
Before you begin
This procedure assumes that you started the terminal driver and connected to a host session over the HLLAPI standard, or the IBM® Personal Communications provider, or IBM RPA internal provider.
Procedure
In the recorder's menu bar, click Recording to enable it. The button turns from gray to blue. After that, go to the terminal emulator screen, and do the actions that you want to record.
What to do next
After you activate the terminal recorder, all actions you do in the terminal emulator screen become a new command in your script. The recorder adds the commands at the end of the script's scope. After recording, you can review the commands to remove redundancy and tweak rows, columns, and index of texts and fields.