QTP - Smart Identification

Sometimes, QTP is unable to find any object that matches the recognized object description or it may find more than one object that fits the description, then QTP ignores the recognized description and uses the Smart Identification mechanism to recognize the object.

QTP's Smart Identification uses two types of properties −

  • Base Filter Properties − The basic properties of a particular test object class whose values cannot be changed without changing the essence of the original object.

  • Optional Filter Properties − Other properties also assist in identifying the objects of a particular class whose properties are unlikely to change often but can be ignored if they are no longer applicable.

Enabling Smart Identification for an Object

Step 1 − Navigate to "Tools" → "Object Identification". Object Identification dialog opens.

Step 2 − Choose the Environment, Object Class and Turn ON "Enable Smart Identification" as shown below −

Smart Identification Configuration

Step 3 − Click Configure and choose the base and Optional Filter Properties.

Smart Identification Configuration

Step 4 − Add Properties in Base Properties apart from the default one and also add/remove Optional Filter Properties. Please note that same properties cannot be a part of both Mandatory and Assistive Properties and click "OK".

Smart Identification Configuration

Step 5 − Verify if the Smart Identification is enabled after adding object of that type in the Object Repository. Smart Identification is set to TRUE. We can also make it False in case we do not want to enable Smart Identification.

Smart Identification Configuration

Step 6 − We can even disable a test Level by applying at test script level under "Settings" of "File" Menu as shown below −

Smart Identification Configuration

Step 7 − If the Smart Identification is disabled as per Step# 6 then it will not apply smart identification for any object during the script execution.

Step 8 − In case the objects are added with Smart Identification as Off, QTP will not use Smart Identification for recognizing in future, even though we have enabled it later.

Kickstart Your Career

Get certified by completing the course

Get Started