QTP shows that an object exists but it is not visible on the screen. Then how to prove whether object exists or not.
Function isHiddenObject(objName)
Set obj = findObject(objName)
w = obj.getROProperty("width")
h = obj.getROProperty("height")
x = obj.getROProperty("x")
y = obj.getROProperty("y")
If w = 0 and h = 0 and x = 0 and y = 0 Then
isHiddenObject = True
End If
End Function
Function isHiddenObject(objName)
Set obj = findObject(objName)
w = obj.getROProperty("width")
h = obj.getROProperty("height")
x = obj.getROProperty("x")
y = obj.getROProperty("y")
If w = 0 and h = 0 and x = 0 and y = 0 Then
isHiddenObject = True
End If
End Function
No comments:
Post a Comment