Tuesday, May 25, 2010

Introduction to HP QuickTest Pro Objects

HP QuickTest Professional uses an Object Repository to store information about the various fields and controls used to build the user interface of a software application. This repository is essentially a database of the names and properties of all the objects encountered during test script creation.
“Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties.” – HP (Mercury) QuickTest Professional User’s Guide
A QuickTest Pro 9.x Object Repository file structure looks something like this:
QTP Object 
Repository
Here’s an example of the object definition for an ‘Add’ button contained in the repository above:
Add button 
defintion
Note that the value of the “name” property defaults to what was discovered during recording, but the value of any property can be changed by a QTP scripter to a more recognizable value - including the logical name - as part of the repository maintenance process.
By comparison, these properties are very similar to object definitions found using the Microsoft IE Dev Toolbar.
Application object:
App Add button 
object
Object properties discovered with Microsft IE Developer Toolbar:
IE Dev Toolbar 
properties
Note also that whatever works in VBScript for object handling works in QTP - but not necessarily vice-versa!

No comments:

Post a Comment