My objective is to get an object from Object Repository file (.tsr) and perform some action on that object like click, set... In the below code "WebButton" object is captured. But when I perform "click" action on this object (brObj). Getting error message in UFT " The test run cannot continue due to unrecoverable error line(20):brObj.Click "
Dim RepositoryFrom, brObj
Dim ObjectRepositoryPath, str, pgStr, btnStr
ObjectRepositoryPath="C:\Repository2.tsr"
Set RepositoryFrom = CreateObject("Mercury.ObjectRepositoryUtil")
RepositoryFrom.Load ObjectRepositoryPath
str = "Browser("+""""+"Title"+""""+")"
pgStr = "Page("+""""+"Title"+""""+")"
btnStr = "WebButton("+""""+"Login"+""""+")"
'MsgBox str
set brObj = RepositoryFrom.GetObject(str+"."+pgStr+"."+btnStr)
brObj.Click 'Getting error for this line
So is there another way in UFT to perform an action on object which is retrived
from Object Repository file (.tsr)