Adding test steps from the General catalog

When you want to add a log statement, verification point, and variable assignment as a step, you can add those steps from the General catalog. You can also add pausing of the test for a specific duration as a test step.

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.
  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 edit branch or create a new edit branch.
  3. Click the General catalog in the Catalog tab in Test Editor.
    The catalog elements are displayed.
  4. Select an element to perform the steps as follows:
    Catalog element Description Action
    Log You can insert a custom log statement in a test as a step. The inserted log statement is printed in the Console window and the Functional report.

    For example, you can add a custom statement to demarcate the test steps related to order generation, user creation, or report generation in an application or you can use a log statement to display the value of a variable.

    Perform the following steps:
    1. Drag and drop the Log element under any test step as required.
    2. Click the Log step.

      The step details pane is displayed.

    3. Enter a custom message in the Log statement text box.
    Pause You can add Pause as a step in the recorded test for a specified duration. You can specify the pause duration in milliseconds, seconds, minutes, or hours. Perform the following steps:
    1. Drag and drop the Pause element under any test step as required.
    2. Click the Pause step.

      The step details pane is displayed.

    3. Specify the amount of time that the step must pause in Duration.
    4. Select the unit of time for the timeout in Unit.

      Alternatively, you can select the Code checkbox to enter the time and unit in the Duration text box.

    5. Optional: Enter a message to indicate the reason for the pause in the Note text box.
    Verify You can verify the property such as content, type, tagname, id, xpath, name, and value of a UI object.

    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.

    Perform the following steps:
    1. Drag and drop the Verify element under any test step as required.
    2. Click the Verify step.

      The step details pane is displayed.

    3. Select an object to be verified from the list in UI Object.
    4. Select an identifier such as Content, Xpath, or Id of the object from the list.
    5. Click +Add Row to provide values to be verified under Verification Points.
    6. Enter the property name and value to be verified in the newly added row.

      Alternatively, you can drag and drop a Property-value pair from the Properties section.

    7. 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.
    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.
    Assign You can assign a value to an existing variable or a new variable. Perform the following steps:
    1. Drag and drop the Assign element under any test step as required.
    2. Click the Assign step.

      The step details pane is displayed.

    3. Enter a value to be assigned in the Value text box.
    4. Select an existing variable from the list or select Add new variable, enter a name for the variable, and then click Add.
  5. Click the Save icon to save the modifications.
You have added steps from the General catalog to update a Web UI test.
You can run the test and view the results. See Running a Web UI test.