Adding a drag-and-drop action in a test from a smartshot

When you want to manually add the drag-and-drop action in a Web UI test, you can do so by editing the recorded test and then add the drag-and-drop action by using a smartshot.

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.

Procedure

  1. Click the Edit 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 3.
  2. Select an existing branch or create a new branch.
  3. Click the test step before which you want to add a drag-and-drop step.
    The step details pane is displayed.
  4. Select an element that you want to drag to the new location from one of the following options:
    • The Smartshot view
    • The Elements list
    • A property-value pair from the Properties list
  5. Right-click the element and select the Drag & Drop option.
    The Details tab displays the values in the UI Object and Action fields. Also, the Object Identified By section displays the From and To tabs. The From tab displays the identified target element.
  6. Switch to the To tab in the Object Identified By section.
  7. Select the destination element on which you want to drop the previously selected element from one of the following options:
    • The Smartshot view
    • The Elements list
    • A property-value pair from the Properties list
  8. Right-click the element and select the Use this element as step target (To) option.
    The details of the target element are populated.
  9. Save the test.

Results

You manually added the drag-and-drop action in a Web UI test by using a smartshot.

What to do next

You can run the test and view the results. See Running a Web UI test.