How UFT uses smart identification - Use-case scenario

Relevant for: GUI tests and components

The following example walks you through the object identification process for an object:

Suppose you have the following statement in your test or component:

Browser("Mercury Tours").Page("Mercury Tours").Image("Login").Click 22,17

When you created your test or component, UFT learned the following object description for the Login image:

However, at some point after you created your test or component, a second login button (for logging into the VIP section of the Web site) was added to the page, so the Web designer changed the original Login button's alt tag to: basic login.

The default description for Web Image objects (alt, html tag, image type) works for most images in your site, but it no longer works for the Login image, because that image's alt property no longer matches the learned description. Therefore, when you run your test or component, UFT is unable to identify the Login button based on the learned description. However, UFT succeeds in identifying the Login button using its Smart Identification definition.

The following explanation describes the process that UFT uses to find the Login object using Smart Identification:

  1. According to the Smart Identification definition you have for Web image objects, UFT learned the values of the following properties when it learned the Login image:

  2. The learned values are as follows:

    Base Filter Properties:



    html tag


    Optional Filter Properties:







    file name






  3. UFT begins the Smart Identification process by identifying the five objects on the Mercury Tours page that match the base filter properties definition (html tag = INPUT). UFT considers these to be the object candidates and begins checking the object candidates against the Optional Filter Properties list.

  4. UFT checks the alt property of each of the object candidates, but none have the alt value: Login, so UFT ignores this property and moves on to the next one.

  5. UFT checks the name property of each of the object candidates, and finds that two of the objects (both the basic and VIP Login buttons) have the name: login. UFT filters out the other three objects from the list, and these two login buttons become the new object candidates.

  6. UFT checks the file name property of the two remaining object candidates. Only one of them has the file name login.gif, so UFT correctly concludes that it has found the Login button and clicks it.