TestComplete uses data types that are supported by script engines and that are compatible with the VARIANT data type. This data type is used in certain programming languages like Visual Basic and C++. VARIANT is a universal type that can be used to store almost any kind of data: number, string, date/time, true/false, references to objects, arrays and so on. All variables and parameters that you create and use in your test projects are VARIANT-compatible.
When describing methods and properties of test objects, TestComplete helps use the following data types (which are VARIANT-compatible):
An integer number, from -2147483648 to 2147483647.
A floating-point value, for instance, 3.14. Real is used in DelphiScript. In other scripting languages, this data type is called Double. Range of available values:
-1.79769313486232×10308 … -4.94065645841247×10-324 for negative values;
4.94065645841247×10-324 … 1.79769313486232×10308 for positive values.
A value that is either
False. In Python, use the title case spelling:
false. VBScript and DelphiScript are not case-sensitive.
A value that stores a date, time or both date and time. This special type is used to perform various operations over date and time values easily. See Working With Dates and Working With Time.
A value that is a reference to some object, for instance, to an object that provides a scripting interface to a window or control, or to an object that provides access to a window image. An example of the Object type usage is the Picture parameter of the
In some cases, TestComplete panels and dialogs report a property or parameter has the IDispatch type. IDispatch is an interface that is introduced by the Component Object Model (COM). Your test scripts can work with the COM objects implementing the IDispatch interface.
Any VARIANT-compatible value. This type is universal and it means the value can hold any data: strings, numbers, references to objects and so on. For instance, the Variant type is used for parameters of the
Runner.CallMethod method, since in general they can be values of any supported type.
The Variant type is also used if a value can have various types, for instance, either boolean or integer like the State parameter of the Check action.