Object Repository in QTPro

The Object Repository
Objectives
-Define what a Quick Test Professional object is.
-Describe the role of the Object repository
-Identify a given object as part of a class.
-Describe how objects are recognized by Quick Test Professional.
-Use the Object Repository to find and add objects.
-Change object logical names using the Keyword View.
Object Types

-A Quick Test Professional object is a graphic user element in an application, such as a button or a drop-down list.
-Objects are categorized into classes. Buttons, Graphic Images and Edit Boxes are a few examples of class types.
QuickTest Object Properties
-In the example above, there are several objects called Buttons, two of which are:
1.Update Order
2.Delete Order.
-The only way to distinguish one object from the other of the same class is by the difference in object characteristics. Specific characteristics of an object within QuickTest are called object properties.
Recognizes Objects
-QTP uses a method when it learns objects during the recording process.
-QTP first looks at the object you are recording and stores it as a test object, determining its object class. For example, Qtp might classify the test object as a standard Windows dialog box or a web button.
-For each object class, QTP has a default set of properties that it always learns.
-Usually, only a few properties are needed to uniquely identify an object.
Assigning a Logical Name

-After learning the class and properties of an object, QTP assigns a name to the object. This is known as the object’s logical name.
-QTP refers to the object in a recorded test by using its logical name.
-Edit the logical name to make it more descriptive if you wish.
-The logical name given to an object during recording may be sufficient, but changing a logical name can give clarity to the test and the documentation that is generated.
Stored Test Objects

-Recorded object properties are stored in QTP’s Object Repository.
-Each test has its own Object Repository, by default..
-These “stored” objects are referred to as “ Test Objects”.
-The purpose of a Test Object is to represent application objects in the test.
-During a test run, QTP uses the Test Object to search for a match in the application during run time.
Steps to change A Logical Name

You can change an object’s logical name in the OBJECT REPOSITORY.
-Right-click on the object at the KEYWORD VIEW level.
-Choose OBJECT PROPERTIES.
-Click on the REPOSITORY button.
The Object Properties Dialog

Once in the Object repository:
1.Right-click the object in the repository tree.
2.Choose RENAME.
3.Type a descriptive name for the object.
4.Click OK.
QuickTest Documentation

-QuickTest updates the object name and documents it in the documentation field of the Keyword View.
-IMPORTANT: if you start a brand new test, the test will record the original, default object names in the Object Repository.
Object Repository

Object Repository: Object identification default properties

Resources->Object Repository

Resources -> Object Repository Manager

Resources -> Associate Repositories

Resources -> Object Repository

Object Repository -> Merging tool

Object Repository -> Comparison Tool

No comments:

Post a Comment