LogError Method (Agent)

Class

Agent.

Action

Logs an error message and a screenshot to the TrueLog file that is written during test execution.

Syntax

C#
LogError (message, [screenshotMode]);
VB
LogError (message, [screenshotMode])
Variable Description
message The text to write to the TrueLog file, typically an error message. String.
screenshotMode Optional: Defines whether a screenshot of the complete desktop, the active application, or the active window should be logged. By default, a screenshot of the complete desktop is logged. Enum.

Example

// C# code
LogError ("*** Error: Expected Message Box did not appear.");
'VB .NET code
LogError ("*** Error: Expected Message Box did not appear.")