Test complete sometimes crashing when “Refresh” method is called on the parent object
Please let us know how to handle this application crash issue:
Tools and S/w versions:
Testcomplete version :9.31
Silverlight version : 5.1.20513.0
Sample Code to search a button and to perform click operation on it:
Function SlvButtonClicker(ByVal sProperty, ByVal sValue, ByVal sField)' <@as> Boolean
Dim arrProperty,arrValue,iChildDepth
Dim bFound
iChildDepth = 40 ' *HardCoded - Child Search Depth
bFound = false
If IsNull(sValue) or sValue="" or IsNull(sField) or sField="" then
log.Error("Invalid parameters..")
SlvButtonClicker = False
Exit Function
End if
arrProperty = Split(sProperty, "|" ) 'To identify an object
arrValue = Split(sValue, "|" )
If Ubound(arrProperty) = Ubound(arrValue) Then
oProcess.Refresh
Set oObject = oProcess.Find(arrProperty, arrValue, iChildDepth, False)
If oObject.exists Then
log.Message(sField &": object found")
bFound = True
Else
bFound = False
End If
If bFound Then
If oObject.enabled Then
Log.Message(sField &": is enabled..")
oObject.Click
SlvButtonClicker = true
Else
SlvButtonClicker = false
End If
End If
End If
End Function