ACCELQ supports automated test logic against mainframe terminal emulators. With the same simple natural language interface, you can build action logic to accomplish data entry and verifications on mainframe applications. ACCELQ supports both HLL and COM-based emulators.
Commands explained in this article work against TE Elements from the element repository. Here is an article on how to set up TE Elements.
Establishing Connection
Open terminal emulator session
Opens a mainframe session with configuration information captured from the given session file. Session file should be available on the Agent machine.
This command must be used before performing any other operations on the TE screen.
emulator client |
Terminal emulator client type |
Note: It is expected that te.ini file is pre-configured on the agent machine.
Set terminal emulator agent mode: Select "expanded" as the mode.
Read Information
Get terminal emulator field text
TE element |
TE Element to retrieve text |
Get all text from terminal emulator screen
Returns
|
text from the terminal emulator screen
|
Example output might looks something like this. You can use ACCELQ's JSON command library to parse this information and insert specific business logic.
{
"1":"First Name << John",
"2":"First Name << Todd",
"3":"ID << 9871"
}
Find column with starting text in terminal emulator screen
Gets column number from Terminal Emulator screen, where the given text starts.
screen row
|
row number on screen
|
Get cursor row number on terminal emulator screen (COM only)
Gets cursor row number in current terminal emulator screen. If failed to get row number, returns -1.
Returns
|
row number of the cursor
|
Get cursor column number on terminal emulator screen (COM only)
Gets cursor column number from current terminal emulator screen. If failed to get cursor column number, returns -1.
Returns
|
column number of the cursor
|
Get row number for matching text on terminal emulator screen (COM only)
Gets matching row number for the given search text of current terminal emulator screen. If failed to get row number, returns -1.
search text
|
text to search on the screen
|
Verifying / Inquiring Information
Verify terminal emulator screen has matching text
Verifies that Terminal Emulator screen contains given text.
match criteria
|
match criteria to evaluate
|
Verify terminal emulator screen does NOT have text
Verifies that the current terminal emulator screen does not contain given text.
match criteria
|
match criteria to evaluate
|
Verify terminal emulator field text is
TE Element
|
TE Element to retrieve text
|
Verify terminal emulator field text is NOT
Verifies that text in the terminal field is NOT matching the given text.
TE Element
|
TE Element to retrieve text
|
Is terminal emulator screen text
Returns true if terminal emulator screen has given text, else returns false.
match criteria
|
match criteria to evaluate
|
Enter Information
Enter text in terminal emulator field
text
|
text to enter in the field
|
Enter encrypted text in terminal emulator field
Enters encrypted text in given terminal emulator field. Optionally, sends a special key to commit the input.
text
|
encrypted text to enter in the field
|
Enter text in current cursor position on terminal emulator screen
Sends given text to current cursor position on terminal emulator.
text |
text to send
|
Send special key to Terminal Emulator screen
Sends given special key to current terminal emulator session screen.
special key |
special key ("TAB", "ENTER", "PAGEUP", "PAGEDOWN", "HOME" or "END")
|
Move Cursor to terminal emulator field
TE Element |
TE Element which cursor should be moved
|
Clear terminal emulator screen text
Synchronizing on Screen Text
Wait until terminal emulator screen has matching text
Waits up to a given number of seconds for a given text to appear on the terminal emulator screen.
wait time
|
Maximum time in seconds, to wait for the text to appear on the terminal |
Wait until terminal emulator screen does NOT have text
Waits up to a given number of seconds for a text to disappear on the Terminal Emulator screen.
wait time
|
Maximum time in seconds, to wait for the text to disappear from the TE screen |
Close terminal emulator session
Note: Screenshot issues when connected using RDP
- Do not close RDP Session directly by closing the RDP window. Instead, use the following script which will ensure the display drivers are still active when you disconnect RDP. Create this batch file on the host machine and simply double-click when you need to disconnect from RDP.
- The batch file should contain the script below. You may name this for example, as disconnect.bat
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
)
Comments
0 comments
Please sign in to leave a comment.