Incubator Command Set

Assert Focus

This command is not part of the Default Command Set. You have to register the Incubator Command Set first (see Configuration).

Asserts, that an item owns the focus.

Parameters

wpath
The WPath identifying the item to check.
Input Field, Password Field, Text Area, File Upload
The path is usually the label of the field.
Single Select Box, Multiple Select Box
The path is usually the label of the select box, a > and then the text of the option to check.
Radio Group
Use the label of the radio button you like to select. If this text is not unique you can as always define some words before to make the path unique.
Check Box
Use the text usually placed after the checkbox you like to select. If this text is not unique you can as always define some words before to make the path unique.
It is possible to use the '*' and the '?' character as wildcards; '*' matches zero or many characters; '?' matches one single character.
It is also possible to define a > separated list of words (with '*' and '?' if needed). Then this command checks the first element after all these words.

Examples

Assert that an entry field owns the focus

Assert that the entry field labeled 'Color' owns the focus.

Command Parameter Optional Parameter
assert-focus Color
Save Bookmark

This command is not part of the Default Command Set. You have to register the Incubator Command Set first (see Configuration).

Bookmarks the current page.

Parameters

name
The name of the bookmark. If there is already a bookmark with this name, it will be overwritten.

Examples

Bookmark a page, do something else and go back to the bookmarked page.

Command Parameter Optional Parameter
open-url https://www.wetator.org
save-bookmark WETATOR
open-url https://htmlunit.org/
open-bookmark WETATOR
assert-content Wetator is a tool for automatic
Open Bookmark

This command is not part of the Default Command Set. You have to register the Incubator Command Set first (see Configuration).

Opens the url previously saved as bookmark with the given name.

Parameters

name
The name of the bookmark.

Examples

Bookmark a page, do something else and go back to the bookmarked page.

Command Parameter Optional Parameter
open-url https://www.wetator.org
save-bookmark WETATOR
open-url https://htmlunit.org/
open-bookmark WETATOR
assert-content Wetator is a tool for automatic
Wait

This command is not part of the Default Command Set. You have to register the Incubator Command Set first (see Configuration).

Waits the given time before continuing with the test execution.

Please use the wait command only if all other options do not work. Consider using the Assert Content command (defining a wait time) instead of this command.

Parameters

wait
The time to wait in seconds before continuing.

Examples

Pause test execution for 4s.

Command Parameter Optional Parameter
wait 4
Exec JS

This command is not part of the Default Command Set. You have to register the Incubator Command Set first (see Configuration).

Execute the given javascript in the context of the current page.

Parameters

script
The script to execute.

Examples

Alert the value of an internal js variable (stateInternal) for debugging.

Command Parameter Optional Parameter
exec-js alert(stateInternal);
Type

This command is not part of the Default Command Set. You have to register the Incubator Command Set first (see Configuration).

Types the given key sequence into the currently focused control.
Use this command to send special keys (e.g. Tab, Enter, arrow keys) or to simulate low-level keyboard input when the Set command is not sufficient.

The control to type into must already be focused. Use Click On or another action to focus the control before using this command.

Parameters

keys
The key sequence to type into the focused control.
Printable characters are typed as-is. Special keys are enclosed in curly braces, e.g. {KEY_TAB}, {KEY_RETURN}, {KEY_UP}, {KEY_DOWN}.

Examples

Type text followed by Tab key into the focused field

Click on the 'Username' field to focus it, type a username, and then press Tab to move focus to the next field.

Command Parameter Optional Parameter
click-on Username
type dobby{KEY_TAB}
Enter Variable

This command is not part of the Default Command Set. You have to register the Incubator Command Set first (see Configuration).

Requires version 3.0

Prompts the user to enter a value for a variable at test runtime.
Use this command when a value (e.g. a one-time password or a dynamically assigned value) cannot be known in advance and must be supplied interactively during the test run.

The variable name must start with '$'. For secret variables (e.g. passwords), prefix the variable name with '$$' — Wetator will mask the value in reports.

Parameters

variable-name
The name of the variable to set (required).
Must start with '$'. Use '$$' prefix to mark the variable as secret.
hint-text
An optional message shown in the input dialog to guide the user. If omitted, a default message is shown.

Examples

Prompt for a one-time password during the test run

Prompt the user to enter a one-time password, store it in the secret variable '$$otp', and then use it to fill in the OTP field.

Command Parameter Optional Parameter
enter-variable $$otp Please enter the one-time password from your authenticator app
set One-Time Password ${$otp}
click-on Verify