key, keypress, keyboard, click, input, scriptless, script-less, scripted, step, view, stepview

Method KeyPress

1 of 2 declarations

Presses any single key (character) in the Application

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function KeyPress( 
        String Key,
        Boolean Report [Optional]
)

Application

ZAP Object step

KeyPress

Enter

true

Key

Report

Parameters

Key

Type: String

Key (character) to press

Report (optional)

Type: Boolean

Default value: true

Report this step to results

Returns

No return value

Example

VBScript

Application("Demo").KeyPress "Enter"
'Remove this step from report
Application("Demo").KeyPress "Enter", false

JavaScript

Application("Demo").KeyPress("Enter");
// Remove this step from report
Application("Demo").KeyPress("Enter", false);

Comment

Press "Enter" key

Script-Less next step

Application

ZAP Object step

KeyPress

Enter

Script-Less next step

Comment

Remove this step from report

Script-Less next step

Application

ZAP Object step

KeyPress

Enter

false


Method KeyPress

2 of 2 declarations

Presses any single key (number) in the Application

Watch this video to learn how to use this method

Have a problem with playback?

Usage

Function KeyPress( 
        Integer Key,
        Boolean Report [Optional]
)

Application

ZAP Object step

KeyPress

13

true

Key

Report

Parameters

Key

Type: Integer

Number of the key to press (i.e. 13 = Enter, 40 = Down Arrow)

Report (optional)

Type: Boolean

Default value: true

Report this step to results

Returns

No return value

Example

VBScript

Application("Demo").KeyPress 13 'Enter
'Remove this step from report
Application("Demo").KeyPress 13, false

JavaScript

Application("Demo").KeyPress(13); // Enter
// Remove this step from report
Application("Demo").KeyPress(13, false);

Comment

Press "Enter" key, it has code 13

Script-Less next step

Application

ZAP Object step

KeyPress

13

Script-Less next step

Comment

Remove this step from report

Script-Less next step

Application

ZAP Object step

KeyPress

13

false

Contact Us

1425 Market Blvd Suite 530-230

Roswell, GA 30076, USA

(800) 795-3552