Micro Focus QTP (UFT) Forums

Full Version: how to add object repositories to qtp through scripting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i tried to add OR to test via scripting it is not coming in the test
Code:
Dim qtApp

Set qtApp = CreateObject("QuickTest.Application")

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

Plz include below statements in ur QTP test.

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