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 we can test a Frame in a web page?
1. In build1 there is a page with two check boxes and a submit button. You have prepared a script for that page and its working fine. In Build 2 the developers have added two checkboxes in the page. Will the script prepared for Build 1 work for Build 2 or not. If yes, why and if No, why. Remember the developers have not touched the object properties of the textboxes in the page.
How can i parameterize the standard checkpoint using Excel sheet where my expected values are there?? suppose i want to test a application with diffent value and want to run 5 iteration?? for each iteration, values will be exported from excel sheet as input. Now i will store some expected values in the excel sheet, which i want to check in the application whether expected equals to actual value??? can any one help me
What scripting language QTP of?
How to capture dynamic objects in qtp like mark up text
Can you write a script for to insert array elements in an excel A to Z columns only. if the number oe elements in the array is greater than the number of columns (A to Z), come to next row and proceed furthur. eah cell should contain only one array value.
How can you merge two Object Repositories?
can anyone tell me how to search a word/line in a document and to paste it in another file? Thanks in advance.
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project
where exactly we can't do the automation testing. give some examples