Setting object location conditions in a test script
In some cases, recorded actions are not replayed as expected because the objects cannot be found. In the test, multiple location operators are available to improve object recognition.
For additional details about object recognition in mobile and web UI tests, see Enhancement of test script robustness.
Here is an example where setting object location conditions is helpful: You record a test, and the action on a step, Click on Edit text,, is not clearly identified, with no label, and with variable content, such as a date. When the test is played back, the action cannot be performed because the date has changed.
For this test to play back successfully, you can modify the object location in the test script so the target object can be found during test replay. For example, you can indicate that Edit text is to the right of a stable graphic object that is easily identifiable, for example, an Edit text field whose label is city. You can proceed as follows: