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 |
How do u do batch testing in WR & is it possible to do in QTP, if so explain?
where u maintain qtp scripts in ur company
How to handle the exceptions using recovery scenario manager in QTP?
If you giving priority as p0, as a developer if I give priority as p2, What happens In user defined function ?
How To write script in QTP For Field Validation Example: password Field is accepting A range 8-20 characters only.How to write script?
can we call a test in another test?
I dont know how to configure non standard objects to standard objects in QTP9.2 can i have someone explain me in breify?
how can i do QTP Certification can any 1 tell me . How 1 approch and who to approch
I am in .Net development for past 3.5 years and want to enter in to automated testing and learn QTP. For this I need some good tutorial for beginners. I will be really greatful if any one has and they can send it to me on this address- ruchidureja@gmail.com
Is it possible to test Flat file using QTP? I have two file- first file is Input file and second file is output file. Input file has Format like first 2 field is record type, next 10 field is Description. Output file also has format. I want to check this file format using QTP. Is it possible?? please reply with example.
How can we close all webbrowsers which are opened in out desktop?
What is the difference between a Test and a Business Component? Is it necessary to use Business Component while testing an application in the real time?