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


Please Help Members By Posting Answers For Below Questions

Hi am New to Automation Testing , any one can you help me what are the basic questiion are asked an interview?

1416


hi to all, i need a code.. in flight application 1.i need to login first then i need to insert 3 new orders... 2.i have to log out 3.i have to login again with different user 4.need to insert 2 new orders 5.then need to log out 6.then again login with different user 7.3 new orders create and log out 8.but we hv to do this using data table and actions please help me

1746


hi guys, pls tell me for testing institution training hub, hitech city is best or not?

1307


how will load the object during runtime?

1572


How to check feasibility of the appliction?in automation testing?

1463






can test automation improve test effectiveness?

1478


suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question

1480


Explain the views in the QTP GUI?

612


What are the features and benefits of quick test pro (qtp 8.0)?

587


I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...

1708


when to start the automation?

1468


How to get popup error message.

1021


In an interview, what r the general questions asked in SQL which is realted to testing ?pls give me anwser to this question?

1431


What is the file extension of the code file and object repository file in QTP?

585


How is UFT 11.5 version different from UFT 12.0?

598