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 is accessibility check point?
what the difference between shared repository and per action repository?
What are benefits of qtp?
What is the syntax to call one action in another?
What is test object model in quicktest professional?
Explain the parameter in qtp?
How to import a test case present in ".xls" file to TD under a Test set?
How may types of defects identify application or your currently working application?pls give me answer..
what is error and fault in terms of software quality?
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)
How will you check that your test cases covered all the requirements?
Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..
If the objects hierarchy is changing from build to build, then how you will handle that condition?
How to find Operating system information using QTP script?
Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?