How to load the object repository at run time?

Answers were Sorted based on User's Feedback



How to load the object repository at run time?..

Answer / vinod

To be more simple
go with this

RepositoriesCollection.Add " .tsr File path "

Is This Answer Correct ?    16 Yes 1 No

How to load the object repository at run time?..

Answer / 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

How to load the object repository at run time?..

Answer / sandeep.v

Dim qtApp
Dim qtRepositories
Set qtApp = CreateObject("QuickTest.Application")
Set qtRepositories = qtApp.Test.Actions
("ActionName").ObjectRepositories

qtRepositories.Add "E:\Sandeep_Documents\Sandeep_Working\sha
redRepository.tsr"

Is This Answer Correct ?    3 Yes 0 No

How to load the object repository at run time?..

Answer / sarath

Tried with QTP 9.1 and it works....

Dim qtApp
Set qtApp = CreateObject("QuickTest.Application")
'Add
qtApp.Test.Actions(1).ObjectRepositories.Add "C:\ObjRep.tsr"

'Remove
qtApp.Test.Actions(1).ObjectRepositories.Removeall

Is This Answer Correct ?    3 Yes 1 No

How to load the object repository at run time?..

Answer / sari

hi krishna,

LOADING OBJECT REPOSITY AT RUN TIME U WROTE SMALL FUNCTION
IN THAT U MENTIONED OBJECT .

CAN YOU PLZ EXPLAIN HOW THAT OBJECT WORK COMPLETELY

REGARDS
SARI

Is This Answer Correct ?    0 Yes 0 No

How to load the object repository at run time?..

Answer / ram.polavarapu

Repositarycollection.Add"file.tsr"

Is This Answer Correct ?    1 Yes 1 No

How to load the object repository at run time?..

Answer / atin

QuickTest Professional 9.0 does not support dynamically
loading object repositories at runtime. AOM (Automation
Object Model) statements are not designed to be executed
from within a test script.

QuickTest Professional 9.0 does allow you to associate and
load (not at runtime) multiple Object Repository files.

-Atin Srivastava

Is This Answer Correct ?    2 Yes 3 No

How to load the object repository at run time?..

Answer / uday kumar_anem

Use the Automation Object Model to specify the path to a
Object Repository:
Dim App 'As Application
Set App = CreateObject("QuickTest.Application")
App.Test.Settings.Resources.ObjectRepositoryPath
= "<PathToYourObjectRepositoryFileHere>"

Is This Answer Correct ?    2 Yes 3 No

How to load the object repository at run time?..

Answer / krishna reddy

Hi We can call the TSR file in runtime and in 8.2 and 9.0
also.

How means.. i am giving one function

Public Function UDF_ORUpdate(g_ActName,sv_qtFileName)
Dim qtApp
Dim qtRepositories
Set qtApp = CreateObject("QuickTest.Application")
Set qtRepositories = qtApp.Test.Actions
(g_ActName).ObjectRepositories
qtRepositories.removeall
qtRepositories.Add sv_qtFileName

End Function

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More QTP Interview Questions

How we can we create a Text checkpoint in QTP 9.1,Actually what i did is first i put in recording mode and gofor Inser menu>Checkpoint>Textcheckpoint>click,Now an hand symbol came and i showed it to some textbox and cliked but the QTP9.1 is giving an error message like "The Obkect you are selecting doesn't support this operation" If i go for Help of QTP 9.1 information I didn't get any solution,pls help me in this issue.

6 Answers  


can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?

0 Answers  


A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.

0 Answers   TCS,


w is active screen

2 Answers   GCI, Wipro,


What does VBS file contain?

1 Answers  






How to handle the exceptions using recovery secnario manager in quicktest professional (qtp)?

0 Answers  


Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

0 Answers  


can we change the name of a check point? when will you start writing testcases? do you follow any methodology for writing test scripts? qtp is key word driven testing or data driven testing?

2 Answers  


Hi All, I am a beginner in QTP and have understood the basics of QTP by going through tutorial. I am trying to Automate a HRMIS application, What is the right approach to Automate this application. Kindly answer. Thanks in advance

1 Answers  


Hi Friends, Im planning to do certifcation in mercury Automation Tool QTP.But I Didnt get any clear details regarding course syllabus, fees, where to approach, and which certification would be useful for the experienced testers? can any one send me the details?

0 Answers  


What are the Features & Benefits of Quick Test Pro ?

0 Answers   Crea,


Use of Multiple Actions in QTP?

3 Answers  


Categories