Forum Discussion
Abramova
Staff
14 years agoHi,
To post the custom object name to the log, you can modify your script in the following way:
Function clickcontrol(Object)
If Object.exists then
Object.Click
Else
Log.Message( "The object is not found") 'the modified line
End If
End function
Sub abc()
XXX = NameMapping.Sys.Process("XXX")
Call clickcontrol(XXX)
Log.Message ("The object custom name is XXX") 'the added line
End Sub
Now if the object has not been found, TestComplete will post two messages to the log. The first message informs you that the object has not been found, the second one contains the object's custom name.