02-15-2011, 05:30 PM
HI All,
I am trying to write a reusable action for verifying weather obect exist or not but I am getting "Object does not support this Property or Method obj.Exist"
Please help me on this
I am trying to write a reusable action for verifying weather obect exist or not but I am getting "Object does not support this Property or Method obj.Exist"
Code:
Set objxyzWin = SwfWindow("xyz")
IsMainWindowExist = WaitforObjExist(objxyzWin)
If IsMainWindowExist = False Then
Reporter.ReportEvent micFail,"xyz Main Window Exist","Unable to find Main Window"
ExitAction
End If
Reusable Action
Public Function WaitforObjExist(obj)
temp = 1
IsExist = False
Do while temp < 30
obj.Exist
Wait(10)
Loop
If temp < 30 Then
IsExist = True
End If
WaitforObjExist = IsExist
End Function
Please help me on this