How to load the object repository at run time?
Answer Posted / sanurajps
hi,
One of the new feature of QTP 9.2 is Dynamic Management of OR.
>>ADD - RepositoriesCollection.Add("D/OR/test.tsr")
-- it will add the 'test.tsr' file during the run time
>>FIND - Pos = RepositoriesCollection.Find("D/OR/test.tsr")
-- it will return a numeric value to the variable 'Pos' this
is nothing but the index value of the specified file
>>MOVETOPOS - RepositoriesCollection.MoveToPos(2,5)
-- here 2 is the current index and 5 is the new index
position. In this case it will move 2nd item to 5th position
>>REMOVE - RepositoriesCollection.Remove(5)
--it removes the 5th object repository file from the OR
>>REMOVEALL - RepositoriesCollection.RemoveAll
--it removes the full items from OR. Makes object repository
empty
>>COUNT - no = RepositoriesCollection.Count
--stores the number of repository items to 'no'
>>ITEM - desc = RepositoriesCollection.Item(4)
--returns the path of the 4th object repository file.
Thnx
Sanu
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
How does quicktest professional identifies the object in the application?
what difference between runtime object and text object and what property they have. whether they have same properties or different properties.
What is different command used in command Prompt while using QTP?
write a script for allinterview-submit Question first we've to select Choose Category,second select Sub- Category(Which is comes in to runtime)third select Question Type.for that give some descriptive and vb script
How to open a new test using quicktest professional?
What are the views available in qtp?
Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com
Can we use index on view?
what are the challenges you have faced while testing web based application using the automation tools ?
Can any body please tell me the steps of keyword driven framework of QTP.
What is standalone database?
Is it possible to switch between recording modes during a test creation?
What is QTP and the use of QTP in TD?
Explain the terms test and business component?
I used the below code to open QTP through VBscript?But i can unable to Invoke QTP...PLZ help me with the correct code to invoke QTP through VBS with description of the code aswell. Dim qtApp 'As QuickTest.Application 'Declare the Application object variable Dim qtTest 'As QuickTest.Test 'Declare a Test object variable Dim qtResultsOpt 'Declare a Run Results Options object variable Set qtApp = CreateObject("QuickTest.Application") 'Create the Application object qtApp.Launch 'Start QuickTest qtApp.Visible = False 'Make the QuickTest application visible qtApp.Open "C:\form", True 'Open the test in read-only mode 'set run settings for the test Set qtTest = qtApp.Test qtTest.Run 'Run the test 'WScript.StdOut.Write "Status is: " & qtTest.LastRunResults.Status 'Check the results of the test run qtTest.Close 'Close the test qtApp.quit 'Close QuickTest Pro Set qtResultsOpt = Nothing 'Release the Run Results Options object Set qtTest = Nothing 'Release the Test object Set qtApp = Nothing 'Release the Application object