Tuesday, 3 November 2015

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 matches the description, then by Smart identification method we can identify the object. So, 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: Go to "Tools" menu →Click on "Object Identification". Object Identification Dialog box  Opens.
Step 2: Choose the Environment, Object Class and Turn ON "Enable Smart Identification" as shown below:

Step 3: Click Configure and choosing the base and Optional Filter Properties.

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 part of both Mandatory and Assistive Properties and click "OK".



Step 5: Verifying 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 dont want to enable Smart Identification.

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

Step 7: If the Smart Identification is disabled as per Step# 6 then it won’t apply smart identification for any object during script execution.
Step 8: In case objects are added with Smart Identification as Off, QTP won't use Smart Identification for recognizing in future, even though we have enabled it afterwards.


No comments:

Post a Comment