Adding a Verify step

You can verify the property such as aria label, class, content, exists, href, id, label, name, placeholder, tagName, type, value, and xpath of a UI object. You can use any property that is listed in the Properties section for verification. When you run the test, Test Hub compares the property of the object that was set in the recorded test with the property of the object during the playback. This comparison helps determine if any changes have occurred in the application, either intentionally or unintentionally.

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 Verify element under any test step as required from the UI catalog in the Catalog tab.
  4. Click the Verify step.
    The step details pane is displayed.
  5. Perform the following steps in the step details pane:
    1. Select an object to be verified by dragging and dropping an element from Smartshot view, an element from Elements list, or a property-value pair from the Properties list.

      Alternatively, you can select an object to be verified from the list in UI Object, and then select an identifier such as Class, Content, Label, Xpath, or Id of the object from the list. If you follow this method, you must ensure that the object is highlighted in the Smartshot view after you enter the values.

    2. Click click here to add a row to provide values to be verified under Verification Points.
    3. Enter the property name and value to be verified in the newly added row.
    4. Optional: Click the Click here to add relative to link, specify the relative location in the Location field, and specify the relative object in the UI Object field.
    5. Optional: Click the Click here to add alternative identifier link, and select a target object from the list in the Target 2 field.

      Alternatively, you can drag and drop an element from the Smartshot view.

    6. Optional: Select the Override Timeout checkbox in the Advanced tab and increase the timeout value in Duration for the object verification.
  6. Click the Save icon to save the modifications.

Results

You have added a Verify 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.