Micro Focus QTP (UFT) Forums
Object Repository query - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Object Repository query (/Thread-Object-Repository-query)



Object Repository query - priya02 - 02-01-2008

Hi,

Can someone tell me what is a shared repository? Is it same as the default repository or we change some settings of default repository to make it a shared ??

And how do we call a object repository at runtime...I have to call a particular object repositort of one application while running automation scripts for another application..


RE: Object Repository query - deepakmehta82 - 02-27-2008

Hi Priya,

Shared repository is a repository which you can make at any place in your hard disk.Shared repository is common for all the actions that is the object that you have defined in this repository would be used and same in all the actions that you run.It has its own advantages and disadvantages.I would suggest you not to use shared repository until you are well versed with the data flow of your application and QTP as well.Use per action repository.It would be easy to handle.Anyways,if u wanna know how to make and where to make a shared repository then open the QTP and go to Test->Settings and then click on the Resources tab.There you will see the object repository type and you can browse and give the path of your own shared repository.
As far as I know,it is not possible to call a object repository of one application while running script for another application.

-Deepak


RE: Object Repository query - newqtp - 02-27-2008

But you can load object repository at run time instead of doing it throug settings.
Here is the code:

Code:
Set ORL=CreateObject("Mercury.ObjectRepositoryutil")
ORL.Load "Shared object repository path is given here"

this code will load the shared repository at run time.

Correct me if I'm wrong.


RE: Object Repository query - deepakmehta82 - 02-28-2008

Her question was to use object repository of one application in another application.You can offcourse load the object repository(shared) but how can you use both the repositories because the windows of both the applications would be different.But If you can place the objects of the windows appearing in the new application then offcourse you can use the shared repository for both the applications.BUt,it will be so cumbersome and quite confusing and chances of error and not running smooth would be very high.