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

No comments:

Post a Comment