OnLogWarning Event

Applies to TestComplete 15.64, last modified on May 16, 2024

Occurs before a warning message is posted to the test log.


OnLogWarning(SenderLogParams) Parameters
Sender [in] Required Variant
LogParams [in] Required A LogParams object


The event occurs before a warning message is posted to the test log. You can create the OnLogWarning event handler to perform desired actions upon posting warnings to the log. For instance, TestComplete posts an ambiguous recognition warning when a script attempts to address a window using recognition attributes that coincide with the attributes of two or more windows. You can use the LogParams.MessageText and LogParams.AdditionalText properties to replace the TestComplete text with your own.


The event has the following parameters:


The Event control that processes the event.


The properties of the LogParams object hold the attributes of the posted message.

To avoid recurring calls, do not use the Log.Warning method within the event handler of the OnLogWarning event.


For information on how to create an event handler for this and other TestComplete events, see Handling Events.

See Also

Posting Messages to the Log
LogParams Object
OnLogMessage Event
OnLogError Event
OnLogCheckpoint Event
OnLogEvent Event
OnLogPicture Event
OnLogFile Event
OnLogLink Event
Handling Events
Event Control

Highlight search results