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 |
This is Ajay i have few douts if anybody know pls give me reply. 1. i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording
How to capture a window in qtp or how to take snapshot of any window while writing script in qtp
As u told write Libarary files in QTP. Do u use ever oject repositary 0r spy while writing scripts and for which type of testing u prepared test scripts.
Explain measuring transaction.
What are the types of Object Repositories in QTP?
what is Compile Module in QTP? what exactly it contains Functions or Actions?
How do you start automating/ writing your QTP scripts ?
How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks
can we change the name of a check point? when will you start writing testcases? do you follow any methodology for writing test scripts? qtp is key word driven testing or data driven testing?
How do you connect to database ,What is the script to connect DATA BASE?
How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)
Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.