Forum Discussion
ArmandsBruns
12 years agoFrequent Contributor
Hi Tanya,
Thanks for your response.
I add aditional (Visible=True)
Now it is much better than it was (always find and clikc on object), but sometimes still displays the same error. "The window size is (1, 1); screen rectangle: the left top corner is (0, 102), the right bottom corner is (0, 102).
The screen coordinates of the point is (0, 102)."
any ideas?
------------------------------------------------
Function IfObjectExists(location, typeID, name)
IfObjectExists = False
Sys.Refresh()
location.RefreshMappingInfo
Do
counter = counter + 1
Sys.Refresh()
location.RefreshMappingInfo
If(location.FindChild( typeID, name,30).Exists <> Empty ) Then
IfObjectExists = True
log.Message("Find this object - '"+typeID+"', '"+name+"' - and click!")
object = location.FindAllChildren(typeID, name, 20000, True)
For i = 0 to UBound(object)
If object(i).Exists and object(i).Visible=True Then
object(i).Click
log.message("click to object")
Next
Log.Message "Find: " & (UBound(object) + 1)
Call location.Wait
Else
IfObjectExists = False
aqUtils.Delay(2000)
Sys.Refresh()
location.RefreshMappingInfo
log.Message ("Doesn't find this objects: '"+typeID+"', '"+name+"'")
End If
Loop Until IfObjectExists = True or counter > 25
End Function
------------------------------------------------
Regards
Armands
Related Content
- 12 years ago
- 11 years ago
- 11 years ago
Recent Discussions
- 2 days ago
- 7 days ago
- 11 days ago