how do you remove object repository at runtime and load
object repository and verify it
Answer Posted / ravindra
'Adding Repository to an action
'*********************************************************************
Dim qtApp,qtRepositories, actName, RepPath
RepPath=".TRS File Path"
actName=Environment.Value("ActionName") 'Get Action Name
Set qtApp = CreateObject("QuickTest.Application") ' Create Application Object
Set qtRepositories = qtApp.Test.Actions(actName).ObjectRepositories ' Get Associated repositories list
If qtRepositories.Find(RepPath) = -1 Then
qtRepositories.Add RepPath, 1 ' Add the Object Repository to the current action
End If
qtApp= Nothing
qtRepositories= Nothing
'*********************************************************************
'*********************************************************************
'Remove repository from an action
Dim qtApp,qtRepositories, actName, RepPath, rPosition
RepPath=".TRS File Path"
actName=Environment.Value("ActionName") 'Get Action Name
Set qtApp = CreateObject("QuickTest.Application") ' Create Application Object
Set qtRepositories = qtApp.Test.Actions(actName).ObjectRepositories ' Get Associated repositories list
rPosition=qtRepositories.Find(RepPath) 'Find the Position of the Repository
If rPosition<>-1 then
qtRepositories.Remove rPosition ' Remove Repository From the Action
End if
qtApp= Nothing
qtRepositories= Nothing
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do you know the location Id of an object if you know its index id?
Hi, While recording a Jave based web application, its recording all my actions and the objects.And I have 5 WebEdit objects on the page and all are recorded. But while execution, at the 2 WebEdit object, its entering the value into the object (Its making a call to the AJAX, matching the value), when the control get out of this object the value is erased or cleared. Could anyone please help. I have recoreded 5 more scenarios where WebEdit is in the picture on different webpages and all are working fine. Here is my Script: Browser("Sign In").Page("Matching Workbench_3").WebEdit ("locationLookup").Set "0320 - SEATTLE-KM" Browser("Sign In").Page("Matching Workbench_3").WebEdit ("supplierNameLookup").Set "TRAMMO PETROLEUM INC" *** SupplierNameLookup is the object, which is haing an issue. And also I was using the SendString function, but it didnt work.
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
what are the limitations of smart identification in qtp 9.0
Explain how you can find the absolute value of the number in qtp?
For which type of projects the iterative model is not suitable?
There is an excel file of 1 to 100 sheets how you will iterate through it?
What is the basic concept of quicktest professional?
What are some test assets and related extensions of qtp?
How to use actions in qtp ?
Explain different types of action in qtp?
What are the things(properties, and other details) will be recorded while recording an object using normal recording?
How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?
Can I change properties of a test object?
What is the descriptive programming?