Log Object

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

TestComplete provides a test log structure that can hold text messages, images, files and file links generated from tests. The test log, which you can view via the Test Log, can store its items as a plain list or have them organized as a tree whose nodes are folders that can include test log items and other folders.

You can work with the test log from your scripts using the Log object. Its methods allow you to insert items of different kinds into the test log as well as to create folders in the log. For instance, the following code posts an informative message to the test log:

JavaScript, JScript

Log.Message("My Message", "My Message Description", pmNormal);

Python

Log.Message("My Message", "My Message Description", pmNormal)

VBScript

Log.Message "My Message", "My Message Description", pmNormal

DelphiScript

Log.Message('My Message', 'My Message Description', pmNormal);

C++Script, C#Script

Log["Message"]("My Message", "My Message Description", pmNormal);

Members

Example

To view an example that demonstrates how to use the Log object, see the Posting Messages From Scripts section of the Posting Messages to the Log topic.

See Also

Test Results

Highlight search results