Adding user actions in a test from smartshots
When you want to add user actions as steps in an existing Web UI test, you can add such steps from smartshots associated with the test. You can select a graphical element in the smartshot and add a user action for that element.
Before you begin
You must have completed the following tasks:
- Ensured that you are assigned a Team Space Owner, Project Owner, or Member with a Tester role to create or edit a test resource.
- Read and understood the information in Edit branch overview and Create or select an Edit branch.
- Ensured that your project contains a Web UI test in the test navigator panel.
- Opened the test in Test Editor. See Editing a Web UI test.
About this task
Procedure
-
Click the
button, if it is displayed on the Test Editor page. Otherwise, go to step 3.
The Edit branch dialog is displayed. - Select an existing branch or create a new branch.
-
Click the UI catalog in the Catalog tab
in Test Editor.
The following user actions are listed:
- With
- Open
- Click
- Select
- Type
- Press
-
Drag and drop an element from the catalog after the required step.
A test step is added.
-
Click the newly added step.
The step details pane is displayed.
-
Hover over a UI element in the Smartshot view, right-click, and
then select one of the following options:
- Use this element as a step target
- Create user action for this element: Click, Select, Type, Verify, Assign
If you selected the Use this element as a step target option, the action or condition is assigned to the selected element. Else, if you selected the Create user action for this element option with one of the listed actions, a step is added just before the selected step.The step details pane is displayed with the Smartshot, UI Object type, Action, and Object Identified By details. The values displayed are dependent on the object selected.
- Optional: Click the Click here to add relative to link, specify the relative location in the Location field, and then specify the relative object in the UI Object field.
- Optional: Click the Click here to add optional identifier link, and select a target object by selecting a Smartshot in the Target 2 field.
-
Click the Save icon
to save the modifications.
Results
What to do next
You can perform the following tasks:
- Run the test and view the results. See Running a Web UI test.
- Add additional steps from the catalog. See Adding test steps from the General catalog, Adding UI-related actions and user actions in a test from the UI catalog, and Adding conditional logic and redefining the flow in tests from the Flow catalog.
- Create and use variables in the test. See Creating and assigning test variables.