Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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

Is the qtp course will help to create a virtual object?

1303


action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans

1417


How many types of parameters are available in quicktest professional?

329


How to find a window is minimized or not

1236


If I give some thousand tests to execute in two days what do you do?

383






What is text check point and text area check point?

391


How many add-ins comes by default with quicktest professional (qtp)?

356


Hi, My name is kishan. I have good Conceptual Knowledge on QTP. In order to Boost up my Confidence Level, I want to do a Project oriented Training only on QTP in Hyderabad. Kindly Let me know which is the Best QTP Project Training Institute in Hyderabad. Thanks in Advance kishan

1847


what is review

1388


What is the significance of “action 0” in qtp?

344


How to start recording using quicktest professional?

381


What is checkpoints for quicktest professional?

351


What is the use of ordinal identifier in qtp?

385


Write a script to customize the test results in PDF and HTML format.

1882


Mention what are the different types of recording modes in qtp? Which will be used when?

371