Editing a Web UI test
You can edit a Web UI test to add new steps, remove the existing steps, or update the step details.
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.
Procedure
-
Log in to Test Hub.
The Projects page of the initial team space is displayed.
-
Click
to open the project that contains the test assets.The Overview page of the project is displayed.
-
Click
.The Test Editor page and the test navigator panel are displayed.
-
Click the application for which you recorded a test in the test navigator
panel.
The assets created for the application are displayed.
- Click Tests to view the list of tests recorded for the selected application.
-
Click the .yaml file to open the test.
The test steps are displayed on the Test Editor page.
-
Click the
button, if it is displayed on the Test Editor page. Otherwise, go to step 9.
The Edit branch dialog is displayed. - Select an existing edit branch or create a new edit branch.
-
Select a step to view the details.
The step details pane is displayed. If the step has a user action, then the Smartshot, UI Object type, Action, and Object Identified By details are displayed.
-
Perform any of the following actions to modify the step details as
required:
Action Description Edit the object and action for the step Perform the following steps: - Hover over the UI elements in the
Smartshot view, and then
right-click and select Use this element
as a step target to change the object
assigned for the step. The values in the
Object Identified By field
are updated.Note:
Change the value from the UI Object drop-down list if required.
- Select a user action from the Action drop-down list.
- 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.
- Optional: Click the Click here to add optional identifier link, and select a target object by selecting a smartshot in the Target 2 field.
Open the test that is embedded in the Run step Right-click the Run step and click Open. The embedded test is displayed in Test Editor.
Disable the step Click the Advanced tab and select the Disable checkbox. Alternatively, you can right-click the step and click Disable. The option changes to Enable for the disabled step.
Copy the step Right-click the step and click Copy. Paste the step Right-click a step, and then click Paste. The copied step is pasted after the selected step.
Delete the step Right-click the step, and then click Delete. - Hover over the UI elements in the
Smartshot view, and then
right-click and select Use this element
as a step target to change the object
assigned for the step. The values in the
Object Identified By field
are updated.
-
Click
to close the step details pane.
-
Click the Save icon
to save the modifications.
Results
What to do next
You can perform the following tasks:
- Run the test and view the results. See Running a Web UI test.
- Add additional steps from the catalog. See Adding test steps from the General catalog, Adding UI-related actions and user actions in a test from the UI catalog, and Adding conditional logic and redefining the flow in tests from the Flow catalog.
- Create and use variables in the test. See Creating and assigning test variables.