Showing posts with label Object Repository. Show all posts
Showing posts with label Object Repository. Show all posts

How to associate Object Repository in QTP

Object repository is save with .tsr extension i.e Shared object repository in HP QTP,We can use three ways to associate shared object repositories in QTP.

Three Ways:

1.Using Associate Repository
2.During Run time
3.Using Action Properties


1.Using Associate Repository:

Please follow below steps to associate object repositories in HP QTP

1.Go to Resources menu
2.Click on Associate Repository
3.Click on Add
4.Select Location of repository file path
3.Click on Open
4.Associate with action
5.Click on OK

2.How to associate Object repository during run time

We can associate object repository during run time with below ,we need to declare at the first step of the test script.

repositoriescollection.add "object repository file path"


3.Using Action Properties:


Please follow below steps to associate object repositories in HP QTP using Action properties

1.Right click on Expert view
2.Select Action
3.Select Action properties
4.Select Associate Repositories
5.Click on Add
6.Select location of the Repository file path
7.Click on Open
8.Click on OK

HP-QTP Object Repository

Object Repository:


Object Repository is a interface between HP QTP test script and The web application.Object Repository having logical naming convention and physical description for the application objects.Object Repository screen displays tree structure of all the application objects in the current action.

Navigation:

Resources Menu -->Object Repository

Types of Object Repositories

There are two types of Object Repository

1.Per Action Object Repository
2.Shared Object Repository

1.Per Action Object Repository

Per Action OR stores application objects that are associated with one specific action.So only that action can access the objects which are in Test scripts using per action object repository

2.Shared Object Repository

Shared Object Repository enables to stores application objects that can accessed by multiple components of application and any number of actions can access the shared object repository.

Object Repository Manager

Object Repository Manager enables to open multiple shared object repositories and modify object repositories as needed.We can open shared object repositories both from file system.

Navigation:

Resources-->Object Repository Manager

Operations Performs:

1.Creating new Object Repositories
2.Open object repositories
3.Save modified object repositories
4.Manipulating objects in shared object repositories
5.Managing repository parameters
6.Performing merge operations

Object Repository Comparison Tool

This tool is used to compare two object repositories in order to verify the objects of applications.