Object location in a test

During a Web UI test playback, automatic detection of graphical objects in an application under test (AUT) is essential. However, HCL OneTest UI might not be able to locate a specific object on which an action needs to be performed for various reasons. In such cases, you can update the test script and provide more accurate information to locate the target object.

HCL OneTest UI provides a variety of approaches to identify and locate objects effectively within the AUT. For example, if a recorded step instructs the test to click on Edit text whose content is 'August 30th, 2013', the test might fail during the playback if the current date is different. To address this issue, you can modify the test script to provide more precise object location details. By doing so, HCL OneTest UI ensures that the object is located correctly during the test playback, regardless of dynamic factors.

In HCL OneTest UI, various object location operators are available to identify objects in an AUT. They are displayed in the Object location fields in the User Action Details panel of the test editor. See Setting object location conditions in a test script.

The following screen capture displays fields related to object location in the test editor:

Object locator and secondary location fields with the list of secondary location operators open

Object location in HCL OneTest UI is a critical aspect to enhance object identification during the test playback. By updating test scripts with precise object location details, you can overcome challenges that are associated with dynamic content or changing application states.