During a run session, QuickTest searches for a run-time object that exactly matches the description of the test object it learned while recording. It expects to find a perfect match for both the mandatory and any assistive properties it used to create a unique description while recording. As long as the object in the application does not change significantly, the description learned during recording is almost always sufficient for QuickTest to uniquely identify the object. This is true for most objects, but your application could include objects that are more difficult to identify during subsequent run sessions.
Monday, July 7, 2008
How QuickTest Identifies Objects During the Run Session
How QuickTest Identifies Objects During the Run Session
During a run session, QuickTest searches for a run-time object that exactly matches the description of the test object it learned while recording. It expects to find a perfect match for both the mandatory and any assistive properties it used to create a unique description while recording. As long as the object in the application does not change significantly, the description learned during recording is almost always sufficient for QuickTest to uniquely identify the object. This is true for most objects, but your application could include objects that are more difficult to identify during subsequent run sessions.
How QuickTest Learns Objects While Recording
QuickTest uses the below method when it learns objects during the recording process.
- First, it "looks" at the object on which you are recording and stores it as a test object,
- Determines the test object class that best fits it.
- Then, for each test object class, QuickTest has a list of mandatory properties that it always learns; When you record on an object, QuickTest always learns these default property values, and then "looks" at the rest of the objects on the page, dialog box, or other parent object to check whether this description is enough to uniquely identify the object. If it is not, QuickTest adds assistive properties, one by one, to the description, until it has compiled a unique description; If no assistive properties are available, or if those available are not sufficient to create a unique description, QuickTest adds a special ordinal identifier, such as the object's location on the page or in the source code, to create a unique description.
- Reads the current value of the object's properties in your application and stores the list of properties and values with the test object
- Chooses a unique name for the object, generally using the value of one of its prominent properties.
What is Run Object in QTP?
What is Test Object in QTP?
Subscribe to:
Posts (Atom)