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 do you send email with attachment from outlook using qtp ?
How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.
What is the quicktest professional (qtp) testing process?
How many types of recording modes are there?
what is output value in QTP and how it can be used in automation testing
How do I generate Test Results window using descriptive method ( run time ) after my test execution process? Please have a look of my below code. ========================================================= Dim qtApp Dim qtTest Dim qtResultsOpt Set qtApp = CreateObject("QuickTest.Application") qtApp.Launch qtApp.Visible = True qtApp.Options.Run.CaptureForTestResults = "Always" qtApp.Options.Run.RunMode = "Fast" qtApp.Options.Run.ViewResults = True qtApp.Open "C:\Automation\Example", True Set qtTest = qtApp.Test qtTest.Settings.Run.OnError = "NextStep" Set qtResultsOpt = CreateObject ("QuickTest.RunResultsOptions") qtResultsOpt.ResultsLocation = "C:\Automation\Example\Res1" qtTest.Run qtResultsOpt MsgBox qtTest.LastRunResults.Status qtTest.Close Set qtResultsOpt = Nothing Set qtTest = Nothing Set qtApp = Nothing ========================================================== This code is working fine, but Test Result window is not displaying after execution. Anybody can please help me regading the same. Thanks Akshaya Madali Capgemini India Pvt Ltd 9823213538
Suppose I want fail that check point? How can you do that?
How to test fly out menu in qtp?
Hi How to retrieve data from web element line by line?
Shall we add Local Repository to shared object repository,if yes,how we add
How do I lauch my test website using code from qtp in different environmet, uat and PPTE?
How to upload excel files into Quality Center using QTP Script and how to delete excel files from Quality?
I have created 3 actions in test action1, action2, action3 but I want run action 1,action 3,action2 how can you change in the actions in keyword view?
Describe the differences between functions and actions in UFT?
what type of framework u r using in ur organization