Use the Log Message operation to post messages of the error, warning, event and information types to the test log.
The operation does not return any value.
The operation cannot have child operations.
The operation parameters are organized into the following pages:
On the Message Details page you can specify the frequently used parameters of the operation.
On this page you can modify all of the parameters of the operation:
The message text. This is the value that you specified in the Message edit box of the Message Details page. MessageText can hold data of any OLE-compatible type. If it cannot be converted to text, its value is ignored. To learn more about adding a variable value to the test log, see Posting Messages to the Log.
Additional text to be displayed in the Details pane of the test log (this is the same value that you specified in the Additional Info edit box of the Message Details page). AdditionalText can hold data of any type compatible with OLE. If it cannot be converted to text, its value is ignored.
The AdditionalText parameter can also hold HTML code. The test engine will compile the HTML page and display it in the Details pane. For more information, see Posting Messages to the Log.
Message priority. You can use any integer number or any of the following constants:
|pmLowest||100||The lowest priority of the message.|
|pmLower||200||The message priority which is lower than normal.|
|pmNormal||300||The normal (default) priority of the message.|
|pmHigher||400||The message priority which is higher than normal.|
|pmHighest||500||The highest priority of the message.|
For information on specifying the Priority parameter value, see Specifying Enumeration Values in Parameters.
LogAttributes object that contains the font and color attributes to be applied to the message in the test log.
You can create this object by using the Log Attributes operation or script code. In the latter case, to specify the parameter, you should use a script expression that returns a reference of the
LogAttributes object or use a variable, test parameter or [Last Operation Result] that contains the object reference.
If this parameter is omitted, default attributes will be applied.
Specifies the image to be posted to the test log along with the message. This image will be displayed in the Picture pane of the Test Log when the message is selected in the test log.
To specify the parameter, you can use one the following values:
The [Onscreen Object] value that corresponds to the window, whose image you want to post to the log.
A string constant that specifies the path to the file that holds the image to be posted to the log.
Either [Variable], [Test Parameter], [Code Expression] or [Last Operation Result] values that contain one of the following data:
Identifier of the test log’s folder to which the message will be posted. This can be, for instance, the identifier of the folder created by the previous Append Log Folder operation, or the identifier returned by the
Log.CreateFolder scripting method.
If this parameter refers to a non-existent folder, is omitted or is set to -1 (the default value), the operation will post the message to the currently active folder.
The Log Message operation posts informative, error, warning and event messages to the log. To post messages of the image type (for instance, images of the application windows), use the Post Screenshot operation.
For information on values that can be used to set the operation properties, see Specifying Operation Parameters.
Specifying Operation Parameters
Checking Operation Result
Posting Messages to the Log
Post Screenshot Operation
Append Log Folder Operation
Log Attributes Operation