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
In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?
How to write business scripts using object repository with different scenarios
How is test case write?
What is the Difference between test object and run time object?
What are the types of object repository in qtp?
How would you export a script from one pc to another in qtp?
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
If I give some thousand tests to execute in two days what do you do?
wht type of User defined functions or Java Releated functions do we write in VB scripting
What is difference between shared and local object repository?
What are table and db checkpoints?
Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations
What is the default add-ins in qtp?
What is expert view in qtp?
How can you identify the browser and its information using the qtp script?