Micro Focus QTP (UFT) Forums
vbscript for adding Object Repository - 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: vbscript for adding Object Repository (/Thread-vbscript-for-adding-Object-Repository)



vbscript for adding Object Repository - chetan793 - 12-04-2008

hi frnds

can any 1 giv me the vbscript code for adding object repository from a location

E.g
i have saved OR in "c:\...."location n i want to add that OR through vbscript code

i have tried
RepositoriesCollection.Add "C:\demo\GOR.tsr"

bt its not workingSad


RE: vbscript for adding Object Repository - krishnas.tester - 12-08-2008

Hi,

the statement you have tried is correct. if you want to check that, set a breakpoint after the statement and got object repository you wil find objects in repository. still you faced that issue mail to my personal id "ssivakrishna@ntrustinfotech.com"

Regards
Krishdeep


RE: vbscript for adding Object Repository - papu - 02-26-2009

Use the below code...

Code:
Set App = createobject(QuickTest.Application")
App.test.Action("ExecuteTest").objectRepositories.Add "C:\demo\GOR.tsr"

This will add specified OR to Action 'ExecuteTest'

try this also to add the OR to the test

Code:
Set OR = CreateObject("Mercury.ObjectRepositoryUtil")
OR.Load "C:\demo\GOR.tsr"


Let me know weather this works or not


RE: vbscript for adding Object Repository - Arthieviswa - 03-18-2009

Hi ANKUR,

how to write a script for the custom object? and is there anyway to change custom object to standard object? can u give some sample scripts for this?


External O.R - Manan - 05-27-2010

Hi,

Can anyone let me know how can i create my own O.R in Excel sheet and then import in QTP at run time.

What Parameters/Columns i have to have in Excel, how many properties should i take. help me Out.

Thanks in Advance


RE: vbscript for adding Object Repository - Saket - 05-28-2010

Hi Manan,
you should create a new thread for your query, instead of putting your different query in between a thread.

closing this thread.