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.

About this task

The Test Editor page displays a hierarchical view of the steps in a test. The step details pane displays the object properties with the associated smartshot. You can add a step as a node and add further actions as sub-steps by selecting any of the widgets in the Smartshot view.

Procedure

  1. Click the Edit button, if it is displayed on the Test Editor page. Otherwise, go to step 3.
    The Edit branch dialog is displayed.
  2. Select an existing branch or create a new branch.
  3. Click the UI catalog in the Catalog tab in Test Editor.
    The following user actions are listed:
    • With
    • Open
    • Click
    • Select
    • Type
    • Press
  4. Drag and drop an element from the catalog after the required step.
    A test step is added.
  5. Click the newly added step.
    The step details pane is displayed.
  6. 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.

  7. 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.
  8. Optional: Click the Click here to add optional identifier link, and select a target object by selecting a Smartshot in the Target 2 field.
  9. Click the Save icon to save the modifications.

Results

You have added user actions as steps from smartshots in a Web UI test.

What to do next

You can perform the following tasks: