How to load a object repository in QTP during runtime?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / guru
StrPath = "D:\FrameWork\Repository\GoogleHomePage.tsr"
RepositoriesCollection.Add(StrPath)
Is This Answer Correct ? | 25 Yes | 2 No |
in qtp how can we do test when the build is not ready
if the excel sheet specified in script is not there,we get run time error how to handle the error ,please anybody explain me in detail
what type of scripts are asked in qtp?
WHAT IS THE SIZE OF OBJECT REPOSITORY USING IN YOUR COMPANY? Can any body tell me answer of this quation........
Explain about business process component? types and usage?
how do you remove object repository at runtime and load object repository and verify it
My Application is a client server application , but there is one functionality , when we click on one particular icon it launches web browser . When I am recording in QTP , By select approprait web add in also , it not able to record in web page , I am able to record till click on the icon. Please provide me how to over come this type of problem.
How to recognize and read data from pdf file using Descriptive Programming in QTP?
How can we get a textcheckpoint in QTP9.1?
How to identify the objects using descriptive programming when the object property values are same, i mean in a page 10 objects are there i want to click the 6th object but all the object property values are same? using descriptive programming
What is the standard timing delay for web based application in qtp?
how do u prepare Test Environment ?