Object Identification in UFT


Object Identification Configuration

This feature (Object Identification Configuration) is related to Object Repository based Test design only, not related to descriptive programming.

If we use Descriptive Programming for Test design then we no need to touch this feature.

What is Object Identification Configuration?

Configuring important properties information for recognizing objects uniquely

UFT has default configuration for every environment (ex: Activex, Visual Basic, Web etc...) and that default configuration based on UI design standards.

Why Object Identification Configuration?

For every object 20 to 30 properties information available, Using that complete information recognizing objects is time taking process and some properties may have dynamic values, if we execute the same script it won’t execute next time.

In order to sort out these two issues, UFT follows a pre-defined Object Identification mechanism (It uses some important properties information only, that information based UI design standards)

When Object Identification Configuration is required?
 

If we are using Descriptive programming for Test Design then Not required

If we are using Object Repository based Test design and Our Development team followed UI Design standards then Not required

We are using Object Repository based Test design and Our Development team Not followed UI Design standards then user (Tester) has to configure Object Identification.

Object Identification Configuration is Environment Level

It varies from one environment to another
Ex:


Environment Level: Standard Windows

    Test Object Class: WinButton


Navigation for Object Identification Configuration:

Tools Menu -> Object Identification -> Select Environment-> Select Test Object Class and Configure.

I) Normal Identification
    Mandatory Properties
        native class
        text

    Assistive Properties
        width
        height

II) Smart Identification (Optional)

    Base Filter Properties
        Focused
        Window id
       
    Optional Filter Properties
        x
        y

III) Ordinal Identifier
        Index (0, 1, 2.....)
        Location (0, 1, 2, .....)
        CreationTime (Only for Browser)(0, 1, 2, .....)

Ex:
200 buttons in our Application

120 buttons (Mandatory)
40 buttons (Mandatory + Assistive)
30 buttons (Base Filter Properties)
05 buttons (Base Filter Properties + Optional Filter Properties)

05 (Ordinal Identifier)

Object Identification Process (In Case of Normal Identification)
 

During Learning (Recording is learning and Add Objects also learning), UFT reads all mandatory properties at a time and thinks weather that information is sufficient or not? For recognizing that object uniquely, if it feels sufficient then it stops learning and stores that information, while execution it uses that information.

Otherwise it goes to Assistive properties and learns properties one by one, if it feels sufficient, stops learning and stores that information.

Suppose after learning all Mandatory and Assistive properties still feels that information is not sufficient for recognizing that object uniquely, finally it goes to ordinal identifier, there it learns id as per option (either Index or Location for all objects, One more option for Browser object that is CreationTime).

Object Identification Process (In Case of Smart Identification)
 


During Learning (Recording is learning and Add Objects also learning), UFT reads all mandatory properties at a time and thinks weather that information is sufficient or not? For recognizing that object uniquely, if it feels sufficient then its stop learning and stores that information. while test execution it uses that information.

Otherwise it goes to Assistive properties and learns properties one by one, if it feels sufficient, stops learning and stores Mandatory + Assistive properties information.

Suppose after learning all Mandatory and Assistive properties still it feels that information is not sufficient then it goes to Base filter Properties (In Smart Identification), there it learns all base filter properties at a time and thinks weather that information is sufficient or not? For recognizing that object uniquely if it feels sufficient then its stop learning and stores that information.

Otherwise it goes to Optional Filter properties (In Smart Identification) learns properties one by one, if it feels sufficient, stops learning and stores Base filter + Optional Filter properties information.

Suppose after learning all Mandatory, Assistive properties, Base Filter Properties and Optional Filter properties, still feels that information is not sufficient for recognizing that object uniquely, finally it goes to ordinal identifier, there it learns id as per option (either Index or Location for all objects, One more option for Browser object that is CreationTime).


Note:
-> In Case of Normal Identification the position of Ordinal Identifier is 3rd

-> In Case of Smart Identification the position of Ordinal Identifier is 5th

-> Generally Object Identification configuration is Test Object Class Level, but user can configure single Object also (In object Repository)

-> UFT is I-Tier Application, If we use multiple machines in our project test automation then common configuration is required, to do this UFT has provided "Generate Script" feature

Case Study:


3 projects are running using UFT, three are web based applications, but diff configurations are required then how to maintain diff configurations for same Environment?

Configure 1st Application and "Generate Script"

    Come back to default configuration

Configure 2nd Application and "Generate Script"

    Come back to default configuration

Configure 3rd Application and "Generate Script"



Whenever you want to execute tests on 1st Application then run 1st application configuration file, like that you can maintain different configurations for same environment.


Globalize Object identification Configuration


Navigation:

Tools Menu-> Object Identification

What is Globalize Object Identification Configuration?

Providing Common configuration for all machines in a project

Why Globalize Object Identification Configuration?

Since UFT is I-Tier Application, It can't share services, so we have to Globalize Tool settings

How to Object Identification Configuration?

Using "Generate Script" feature we can Globalize Tool settings

This Script file is VBS file (Pre-defined AOM Script).


Note: Configure Object Identification and Generate script, share that script file to all team members, by executing that script all machines (Computers) can get same settings.

0 comments:

Post a Comment