Adding an Assign step

You can assign a value to an existing variable or a new variable by using an Assign step.

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 edit branch or create a new edit branch.
  3. Drag and drop the Assign element under any test step as required from the UI catalog in the Catalog tab.
  4. Click the Assign step.
    The step details pane is displayed.
  5. Perform the following steps in the step details pane:
    1. Hover over a UI element in the Smartshot view, right-click, and then select Use this element as a step target.

      Alternatively, you can drag and drop a UI element from the Smartshot view to the Object identified by section.

      The UI Object type is identified.

    2. Enter a property name such as Content, Id, or Xpath of the object that must be used for variable assignment in UI Property.

      If you entered the property name correctly, the value of the property is displayed under Extracted Value.

    3. Select an existing variable, or Select Add new variable, enter a name for the variable, and then click Add.
  6. Click the Save icon to save the modifications.

Results

You have added an Assign 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.