Object identification and replay in UFT

249 views Asked by At

If suppose there two or more controls(eg. Buttons) with exactly same properties on a screen and while recording user actions if one of the controls was clicked, how can the appropriate control be identified and replay back the same click by overcoming the ambiguity of that control?

Scenario: Two 'cancel' buttons without an automation id or any useful assistive properties and let's say their hierarchy(ancestors) are same.

Replay script is being executed in UFT.

1

There are 1 answers

2
Motti On

If UFT creates the objects, either via Record or by adding the object to repository, it will automatically add an ordinal identifier. This is a numeric value that selects the controls from the set of controls that match the (rest of the) description. The ordinal is usually based on the placement of the control (starting on the top left) and may not be the most robust way to identify the control.

It's probably better to use Visual Relations Identifier (VRI) which allows describing the control in relation to another control. This is similar to how a human would describe the button, e.g. "The cancel button to the left of the 'are you sure' text".