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 ModuleAttribute:

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, but once it is set, Row needs to be set too.

Row

Row where the key(s) are sent.

This ModuleAttribute is optional, but once it is set Column needs to be set too.

Special key inputs

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

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

Right Tab

{TAB}

@T

Left Tab

{LTAB}

@B

Jump (Set Focus)

{JUMP}

@J

Delete

{DEL}

@D

Clear

{CLEAR}

@C

Reset

{RESET}

@R

Enter

{ENTER}

@E

New Line

{RETURN}

@N

Insert

{INSERT}

@I

Print

{PRINT}

@P

Cursor Up

{UP}

@U

Cursor Down

{DOWN}

@V

Cursor Right

{RIGHT}

@Z

Cursor Left

{LEFT}

@L

Home

{HOME}

@0

End

{END}

@q

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}

@m

PF24

{F24}

@o

Space

N/A

@O

PA1

N/A

@x

PA2

N/A

@y

PA3

N/A

@z

Erase EOF

N/A

@F

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 are using; 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 then deletes the M session.

Switch sessions