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
What are the types of object repositories? Which one is you are using?
If a button named "CLICK" is recorded in low level recording mode , what will be the values stored for "name" property of that button in object repository ?
if anyone has idea of the interview procedure in covansys, plz send me a mail?
When ‘option explicit’ keyword is used in qtp?
Hi, is it possible for recording shortcut key during record session? The application on which I am working is web based application. This application has several shortcut key associated with menu option. I have succesfully recorded all menu option but unable to record shortcut key.
Did QTP prove efficient for your project? Yes or No, explain?
Where can I find and view run-time data table?
What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?
What is contained in the object repository?
How to create a standard checkpoint ?
how to disable the pop ups through QTP using a script
suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question
When should I use smart identification?
What are the Test design techniques you uses in ur project?
what is the difference between data driver & data driven and driver script?