Configuring
Smart Identification properties enables you to help QuickTest identify objects
in your application even if some of the properties in the object’s recorded
description have changed.
When
QuickTest uses the recorded description to identify an object, it searches for
an object that matches every one of the property values in the description. In
most cases, this description is the simplest way to identify the object and
unless the main properties of the object change, this method will work.
While the Smart Identification
mechanism is more complex, it is more flexible, and thus, if configured
logically, a Smart Identification definition can probably help QuickTest
identify an object, if it is present, even when the recorded description fails.
The
Smart Identification mechanism uses two types of properties:
Base filter properties—The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link’s tag was changed from to any other value, you could no longer call it the same object.
Optional filter properties—Other properties that can help identify objects of a particular class as they are unlikely to change on a regular basis, but which can be ignored if they are no longer applicable.
Understanding the Smart Identification
Process
QuickTest “forgets” the recorded test object description and creates a new object candidate list containing the objects (within the object’s parent object) that match all of the properties defined in the base filter property list.
From that
list of objects, QuickTest filters out any object that does not match the first
property listed in the Optional Filter Properties list. The remaining objects
become the new object candidate list.
QuickTest
evaluates the new object as:
If the new object candidate list still has more than one object, QuickTest uses the new (smaller) object candidate list to repeat step 2 for the next optional filter property in the list.
If the new
object candidate list is empty, QuickTest ignores this optional filter
property, returns to the previous object candidate list, and repeats step 2 for
the next optional filter property in the List.
If the
object candidate list contains exactly one object, then QuickTest concludes
that it has identified the object and performs the statement containing the
object.
QuickTest
continues the process described in steps 2 and 3 until it either identifies one
object, or runs out of optional filter properties to use.
If, after
completing the Smart Identification elimination process, QuickTest still cannot
identify the object, then QuickTest uses the recorded description plus the
ordinal identifier to identify the object.
If the
combined recorded description and ordinal identifier are not sufficient to
identify the object, then QuickTest stops the test run and displays a Run Error
message.
No comments:
Post a Comment