Micro Focus QTP (UFT) Forums
how to add object repositories to qtp through scripting - 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: UFT / QTP Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions)
+--- Thread: how to add object repositories to qtp through scripting (/Thread-how-to-add-object-repositories-to-qtp-through-scripting)



how to add object repositories to qtp through scripting - sureshkumar - 11-11-2011

i tried to add OR to test via scripting it is not coming in the test


RE: how to add object repositories to qtp through scripting - vinod123 - 11-11-2011

Code:
Dim qtApp

Set qtApp = CreateObject("QuickTest.Application")

qtApp.Test.Actions(1).ObjectRepositories.Add "C:\Repository1.tsr"



RE: how to add object repositories to qtp through scripting - vIns - 11-11-2011

Hi,

Plz include below statements in ur QTP test.

Code:
strRepPath = "c:\vIns\OR.tsr"   (path of OR)
RepositoriesCollection.RemoveAll()
RepositoriesCollection.Add(strRepPath)



RE: how to add object repositories to qtp through scripting - sureshkumar - 11-18-2011

thanks for your reply