OnLogWarning Event

Applies to TestComplete 15.69, last modified on November 13, 2024

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

Declaration

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

Description

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.

Parameters

The event has the following parameters:

Sender

The Event control that processes the event.

LogParams

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.

Remarks

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