Creating verification points for objects in tests

You can create a verification point in a recorded test for any object such as label, button, or others. You can then set the property of the object to color, font size, opacity, or others, so that HCL OneTest UI verifies the property during the playback.

Before you begin

You must have recorded a mobile, Web UI, or Windows test.

About this task

You can edit a recorded test to create a verification point for an object and set the properties. When you run the test, HCL OneTest UI compares the property of the object that was set in the recorded test with the property of the object during the playback to check whether any changes have occurred in the application, either intentionally or unintentionally. After the test run is completed, you can view the test step for the verification point in the test report. For example, you can create a verification point in the recorded test to check if the Submit button is of green in color. When the test is played back, HCL OneTest UI verifies the properties and displays the result.

Procedure

  1. Open the test in HCL OneTest UI.
    The test is displayed in the Test Contents panel.
  2. Select the test step that contains the details of the object for which you want to create a verification point.
  3. Click Insert, and then select Verification point.
    Alternatively, right-click the selected step, and then click Insert > Verification point.
    A verification step is created and displayed in the Test Contents panel.
  4. Select the verification step.
    The Check Action Details panel for the step is displayed.
  5. Perform the actions for the options that you want to include in the verification point, as provided in the following table:
Option Description Action
Graphic object

The option that lists the objects that you can select for the verification point.

Depending on the graphic object that you select, the corresponding options are displayed in the other UI elements of the Check Action Details panel.

Perform the following steps to select an object in a test:
  1. Click Graphic object.
  2. Select an object from the list.
Object identified by The identifier of the selected object. Perform the following steps to select an identifier for the graphic object:
  1. Click Object Identified by.
  2. Select an identifier such as Xpath or Id of the object from the list, and then provide the values.
Object location

The location of the selected object.

For example, the Submit button can be below a checkbox on a page when you recorded the test.

Select the location of the object from the options provided in the list and then provide the values.

The default value is (automatic detection).

Verify attribute

The attribute to be specified for the selected object.

Some object attributes are dependent on others. Therefore, when you select an attribute, you must select the values that are related to the selected attribute.

If an object takes longer than the expected time to appear or disappear on the application during the test recording, then you can select the Exist property of the object in the list, and then select the Retry verification point until attribute is verified or time out expires checkbox so that HCL OneTest UI waits until the object appears or disappears on the application during the playback, or continues to retry until the attribute is verified.

Select the attribute from the list.

Following are two examples that you can perform to set the attributes to an object:
Examples Tasks to perform
Example 1 You can perform the following tasks to set the Exist attribute to the selected object:
  1. Select Exist from the Verify attribute list.
  2. Select the true checkbox that is next to the Verify attribute list. HCL OneTest UI waits for the object to appear on a page in the application during the playback, and then continues with the test step.

    If you do not select the true checkbox, then HCL OneTest UI waits for the object to disappear in the application.

Example 2 You can perform the following tasks to combine several attributes for the selected object:
  1. Select all of from the Verify attribute list.

    Two additional lists are displayed where you can select the attributes for the object.

  2. Click the add line icon add attribute line if you want to view more lists to select multiple attributes for the object.

    You can click the remove attribute line button icon remove attribute line button to remove an added attribute if there are more than two attributes.

Time out (seconds)

The period of time in seconds that HCL OneTest UI must keep trying to verify the attribute of an object.

For example, if the display of an object took 2 seconds to display during the recording, you can set the same period of time as the time-out period or increase the waiting period for the playback.

Optional: Perform the following steps:
  1. Select the Time out (seconds) checkbox.
  2. Enter the time in seconds that you want HCL OneTest UI to wait to verify the object attribute before the next test step is performed.
Retry verification point until attribute is verified or time out expires The option that specifies whether HCL OneTest UI must repeatedly try to verify the attribute of the selected object until it is verified or until the time-out value that is defined in the Time out (seconds) field expires, whichever occurs earlier.

Optional: Select the Retry verification point until attribute is verified or time out expires checkbox.

For example, if you selected the color attribute to be verified, you can select this checkbox so that HCL OneTest UI waits until the object is verified before it continues to the next test step.

  1. Save the test.

Results

You have successfully created a verification point for an object in the recorded test.

What to do next

You can perform the following tasks: