Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to load a object repository in QTP during runtime?

Answer Posted / nath .t

we can add object repository at runtime

Two ways are there u can add

1. when u write below syntax in Action1

Syntax: RepositoriesCollection.Add(Path)
Ex: RepositoriesCollection.Add(E:\OR\ObjRes.tsr)

if write in Action1 it will automatically add the Object
Respository to the Action1
(i.e Edit Menu-->Action-->Action Properties-->Associate
Repository tab) at runtime.

no need to add the object repository before running.

2. Add the object repository at runtime by using AOM
(Automated Object Model)

Ex:
Dim qtAppn
Dim qtObjRes

Set qtAppn = CreateObject("QuickTest.Application")
qtAppn.Launch
qtAppn.Visible = True

qtApp.Open "E:\Test\Test2", False, False
Set qtObjRes = qtApp.Test.Actions
("Login").ObjectRepositories

qtObjRes.Add "E:\OR\ObjRes.tsr", 1

The above example Add the Object Repository(ObjRes.tsr) to
the "Login" action in Test2.

Here also no need to add the object repository in Test2.

Is This Answer Correct ?    67 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is accessibility check point?

1040


what the difference between shared repository and per action repository?

1002


What are benefits of qtp?

1068


What is the syntax to call one action in another?

996


What is test object model in quicktest professional?

1047


Explain the parameter in qtp?

1002


How to import a test case present in ".xls" file to TD under a Test set?

1186


How may types of defects identify application or your currently working application?pls give me answer..

1961


what is error and fault in terms of software quality?

1927


The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)

3224


How will you check that your test cases covered all the requirements?

1016


Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..

4855


If the objects hierarchy is changing from build to build, then how you will handle that condition?

1011


How to find Operating system information using QTP script?

962


Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?

2035