ManualCheck Object

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

Description

Using the ManualCheck object you can create manual checkpoints. The object contains only one method that displays the Manual Checkpoint dialog and returns True, if the user presses Success in the dialog, otherwise it returns False.

Note that the ManualCheck object was created with the script extensions technology. The object is only available if the Manual Checkpoint script extensions is installed in TestComplete.

Members

Example

The following example demonstrates how to call the Manual Checkpoint dialog in your scripts.

JavaScript, JScript

function Test()
{
  ...

  // Specifies the manual checkpoint name
  var Name = "MyCheckpoint";

  // Checks whether the Files collection contains the specified checkpoint
  if (Files.Contains(Name))
  {
    // Displays the Manual Checkpoint dialog
    if (ManualCheck.Compare(Name))
      Log.Message("The \"" + Name + "\" manual checkpoint has passed successfully");
    else
      Log.Error("The \"" + Name + "\" manual checkpoint has failed");
  }
  else
    Log.Warning("The \"" + Name + "\" manual checkpoint was not found");
  ...

}

Python

def Test():
  # ...
  # Specifies the manual checkpoint name 
  Name = "MyCheckpoint"
  # Checks whether the Files collection contains the specified checkpoint 
  if Files.Contains(Name):
    # Displays the Manual Checkpoint dialog 
    if ManualCheck.Compare(Name):
      Log.Message("The " + Name + " manual checkpoint has passed successfully")
    else: 
       Log.Error("The " + Name + "\" manual checkpoint has failed")
  else: 
     Log.Warning("The \"" + Name + "\" manual checkpoint was not found")
  # ...

VBScript

Sub Test

  ...

  ' Specifies the manual checkpoint name
  Name = "MyCheckpoint"

  ' Checks whether the Files collection contains the specified checkpoint
  If Files.Contains(Name) Then
    ' Displays the Manual Checkpoint dialog
    If ManualCheck.Compare(Name) Then
      Log.Message "The """ & Name & """ manual checkpoint has passed successfully"
    Else
      Log.Error "The """ & Name & """ manual checkpoint has failed"
    End If
  Else
    Log.Warning "The """ & Name & """ manual checkpoint was not found"
  End If

  ...

End Sub

DelphiScript

procedure Test();
var Name;
begin
  ...

  // Specifies the manual checkpoint name
  Name := 'MyCheckpoint';

  // Checks whether the Files collection contains the specified checkpoint
  if Files.Contains(Name) then
  begin
    // Displays the Manual Checkpoint dialog
    if ManualCheck.Compare(Name) then
      Log.Message('The "' + Name + '" manual checkpoint has passed successfully')
    else
      Log.Error('The "' + Name + '" manual checkpoint has failed');
  end
  else
    Log.Warning('The "' + Name + '" manual checkpoint was not found');
  ...

end;

C++Script, C#Script

function Test()
{
  ...

  // Specifies the manual checkpoint name
  var Name = "MyCheckpoint";

  // Checks whether the Files collection contains the specified checkpoint
  if (Files["Contains"](Name))
  {
    // Displays the Manual Checkpoint dialog
    if (ManualCheck["Compare"](Name))
      Log["Message"]("The \"" + Name + "\" manual checkpoint has passed successfully");
    else
      Log["Error"]("The \"" + Name + "\" manual checkpoint has failed");
  }
  else
    Log["Warning"]("The \"" + Name + "\" manual checkpoint was not found");
  ...

}

See Also

About Manual Checkpoints
Manual Checkpoint Dialog

Highlight search results