You can add a press action for window controls or supported keys as a step by using the
Press step from the UI catalog. For example, you
can add a step to minimize a window or press Ctrl + M.
Procedure
-
Click the
button displayed on the Test
Editor page.
The Edit button appears only when no active edit branch is
selected.
Alternatively, right-click the test in the test navigator panel and select
Edit.
The Edit branch dialog is displayed.
If the
Edit branch dialog is not displayed, then go to step
2.
-
Drag and drop the Press element under any test step as required
from the UI catalog in the Catalog
tab.
-
Click the Press step.
The step details pane is displayed.
-
Perform the following steps in the step details pane:
- Select an option from the Press list.
The
Press list displays the Back, Close, Enter, Forward,
Keyboard, Maximize, Minimize, Refresh, Reset, Restore, and Tab options. If you
selected the keyboard option, then the Modifiers and Key fields are
displayed.
- Select one or more modifier keys such as Cmd (only for Mac), Ctrl, Shift, Alt in
Modifier.
- Enter a name of the key to be used in combination with the modifier or independently
in Key. For example, you can use Ctrl + Home or Home.
- Select the Native System Input checkbox to simulate the input
keys or special key actions at the screen level on the active window.
This option
is used to handle non-HTML windows such as file browse dialogs. To interact with
file browse dialogs, you must keep your machine unlocked and the browser dialog must
be in the foreground.
-
Click the Save icon
to save the modifications.
Results
You have added a Press step from the
UI catalog to add user actions in a Web UI test.
What to do next
You can run the test and view the results. See Running a Web UI test.