HOST Modules

The folder TBox XEngines->HOST in the standard subset contains Modules that perform specific tasks for the HOST Engine 3.0.

If you want to steer labels, text boxes, or tables, scan your HOST emulator as described in chapter "Create HOST Modules".

TBox Host Send Keys

The Module TBox Host Send Keys allows you to send specific keys to the HOST application.

It has the following ModuleAttributes:

ModuleAttribute

Description

Keys

Key(s) that you want to send to the application. Use ActionMode Input.

If you want to send function keys, wrap them in curly brackets and quotation marks. For example: "{F4}".

Column

Column where the key(s) are sent.

This ModuleAttribute is optional. If you set it, you have to set Row as well.

Row

Row where the key(s) are sent.

This ModuleAttribute is optional. If you set it, you have to set Column as well.

Special key inputs

The Module can also handle a number of specific keyboard commands as listed in the table below. You can use the values in the columns Tosca Value and Host Emulator Key interchangeably.

If you use special characters in your commands, you need to escape them. For more information, see chapter "Special characters".

For example, to create a new line, you can specify either "{RETURN}" or @N as the value for Key.

    

Command

Tosca Value

Host Emulator Key

Clear

{CLEAR}

@C

Cursor Down

{DOWN}

@V

Cursor Left

{LEFT}

@L

Cursor Right

{RIGHT}

@Z

Cursor Up

{UP}

@U

Delete

{DEL}

@D

End

{END}

@q

Enter

{ENTER}

@E

Erase EOF

N/A

@F

Home

{HOME}

@0

Insert

{INSERT}

@I

Jump (Set Focus)

{JUMP}

@J

Left Tab

{LTAB}

@B

New Line

{RETURN}

@N

PA1

N/A

@x

PA2

N/A

@y

PA3

N/A

@z

Page Down*

{PAGEDOWN}

@v

Page Up*

{PAGEUP}

@u

PF1/F1

{F1}

@1

PF2/F2

{F2}

@2

PF3/F3

{F3}

@3

PF4/F4

{F4}

@4

PF5/F5

{F5}

@5

PF6/F6

{F6}

@6

PF7/F7

{F7}

@7

PF8/F8

{F8}

@8

PF9/F9

{F9}

@9

PF10/F10

{F10}

@a

PF11/F11

{F12}

@b

PF12/F12

{F12}

@c

PF13

{F13}

@d

PF14

{F14}

@e

PF15

{F15}

@f

PF16

{F16}

@g

PF17

{F17}

@h

PF18

{F18}

@i

PF19

{F19}

@j

PF20

{F20}

@k

PF21

{F21}

@l

PF22

{F22}

@m

PF23

{F23}

@n

PF24

{F24}

@o

Print

{PRINT}

@P

Reset

{RESET}

@R

Right Tab

{TAB}

@T

Space

N/A

@O

*Available only for AS/400 (TN5250)

In this example, you create a new line.

Send a command

TBox Host Change Session

The Module TBox Host Change Session allows you to change HOST emulator sessions during execution.

It has the following ModuleAttribute:

ModuleAttribute

Description

SessionID

Session ID of the HOST emulator to which you want to switch. Use ActionMode Input.

The session ID depends on the emulator you use. Typically, it is located under the API-specific settings of the emulator.

If you enter an empty string, the HOST Engine 3.0 deletes the existing session.

SessionID is limited to a single character.

If you run tests in the ScratchBook, your results may differ. Tricentis recommends that you use an ExecutionList to run your TestCases.

In this example, you use the first TestStep to switch to the session with the session ID M.

In the second TestStep, you send the command Enter to the application.

Since the value of the third TestStep is empty, the Host Engine 3.0 deletes the M session.

Switch sessions