Automation and Management of Object Repositories
What is Automation:
Automation is a Microsoft technology that makes it possible to access software objects inside one application from other applications. These objects can be created and manipulated using a scripting or programming language such as VBScript or VC++. Automation enables us to control the functionality of an application programmatically.
An object model is a structural representation of software objects i.e. classes that comprises the implementation of a system or application. An object model defines a set of classes and interfaces, together with their properties, methods and events, and their relationships.
Understanding QTP Automation Object Model:
All configuration and run functionality provided via the QTP interface is in some way represented in the QTP automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in QTP have a corresponding automation object, most options in dialog boxes can be set and retrieved using the corresponding object
property, and most menu commands and other operations have corresponding automation methods.
Management of Object Repositories:
QTP provides an Object Repository automation object model that enables us to manage QTP shared object repositories and their contents from outside of QTP. The automation object model enables us to use a scripting tool to access QTP shared object repositories via automation.
Just as we use the QTP Professional automation object model to automate our QTP operations, we can use the objects and methods of the Object Repository automation object model to write scripts that manage shared object repositories, instead of performing these operations manually using the Object Repository Manager. For example, we can add, remove, and rename test objects; import from and export to XML; retrieve and copy test objects; and so forth.
After we have retrieved a test object, we can manipulate it using the methods and properties available for that test object class. For example, we can use the GetTOProperty and SetTOProperty methods to retrieve and modify its properties.
Automation programs are useful for performing the same tasks multiple times or on multiple object repositories.
Many More Articles on HP QuickTest Professional