Utils Object

Applies to TestComplete 14.50, last modified on April 22, 2021

Description

The Utils object is a top-level object that provide scripting interface to various helper objects.

Members

Example

The following code snippet demonstrates how to use the Utils object to create a stub object:

JavaScript, JScript

function Test()
{
  // ...
  var EmptyObject;
  // Creates a stub object
  EmptyObject = Utils.CreateStubObject();
  // ...
}

Python

def Test():
  # ...
  # Creates a stub object
  EmptyObject = Utils.CreateStubObject()
  # ...

VBScript

Sub Test
  ' ...
  Dim EmptyObject
  ' Creates a stub object
  Set EmptyObject = Utils.CreateStubObject
  ' ...
End Sub

DelphiScript

procedure Test;
var EmptyObject;
begin
  // ...
  // Creates a stub object
  EmptyObject := Utils.CreateStubObject;
  // ...
end;

C++Script, C#Script

function Test()
{
  // ...
  var EmptyObject;
  // Creates a stub object
  EmptyObject = Utils["CreateStubObject"]();
  // ...
}

See Also

TestComplete Helper Objects
Picture Object
Point Object
Rect Object
Size Object
Timers Object

Highlight search results