Hi Anand Kumar Meher,
Try this:
====================
Function FindChild(location, typeID, name, pressed_object)
Dim Attr, counter
Set Attr = Log.CreateNewAttributes
Set Attr2 = Log.CreateNewAttributes
Attr2.Bold = True
Attr2.FontColor=RGB(255, 0, 0)
FindChild = False
Sys.Refresh()
Aliases.RefreshMappingInfo
counter = 0
Do
counter = counter + 1
Sys.Refresh()
Aliases.RefreshMappingInfo
If(location.FindChild( typeID, name,30).Exists <> Empty ) Then
FindChild = True
log.Message("Find the - '"+typeID+"', '"+name+"'.")
object = location.FindAllChildren(typeID, name, 20000, True)
For i = 0 to UBound(object)
If object(i).Exists and object(i).Visible=True Then
log.Message "Pressed the - '"+pressed_object+"'",,, Attr
object(i).Click)
End If
Next
Log.Message "Find: " & (UBound(objekts) + 1)
Else
Aliases.RefreshMappingInfo
aqUtils.Delay(1500)
Sys.Refresh()
Aliases.RefreshMappingInfo
log.Message ("Didn't find: '"+typeID+"', '"+name+"', '"+VarToStr(counter)+" - attempt!'")
End If
Loop Until FindChild = True or counter > 24
If counter = 25 and FindChild = False Then
Log.Error "Didn't press the: '"+pressed_object+"'",,, Attr2
Else
Sys.Refresh()
Aliases.RefreshMappingInfo
End If
End Function
=================
Best regards
Armands