You are on page 1of 13

Quick Test Professional - QTP Session -7 VeriTest, Chennai

Session-7: Agenda
How QTP learns objects while recording How QTP recognizes the objects during Run time What is an Object Repository Types of Object Repository Local Object Repository Object Repository Manager Object Spy Class, Properties and Methods Q & A Assignment

How QTP learns object while recording


As you record your test, QTP will add an entry into an object repository as test object for each item you interact with. Each Object will be identified by a logical name (determined automatically by QTP), and contains a set of properties (type, name, etc) that uniquely identify each object.

How QTP recognizes the objects during Run time


QTP searches for a run-time object that exactly matches the description of the test object stored in the repository. Description is the physical property and logical name used for identifying an object

What is an Object Repository


QTP stores the definitions for application objects in a file called the Object Repository.

Object Repository Main window

Types of Object Repository


Per Action Object Repository

Shared Object Repository

Object Repository Manager


The Object Repository Manager enables you to perform the following operations: Creating New Object Repositories Opening Object Repositories Saving Object Repositories Closing Object Repositories Modifying Object Repositories Merging Repositories

Object Repository Manager

Object Spy
Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected objects hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.

10

Object Spy Contd.

11

Class, Properties and Methods


Class: Class is a template of an object and also its a collection of properties and methods

Properties: A named attribute of an object. Properties define object characteristics such as size, color, and screen location, or the state of an object, such as enabled or disabled.
Methods: Methods are used to perform action on an object and can also be used to retrieve object property values Example
Click

CheckProperty

12

Q&A

13

You might also like