Applies to TestComplete 14.20, last modified on September 11, 2019

Description

The aqConvert object provides unified methods for converting between various data types.

Note that it is possible to skip the object’s name (aqConvert) when calling its members in scripts. For example, the following two lines are equivalent:

JavaScript, JScript

str = aqConvert.VarToStr(x);
str = VarToStr(x);

Python

str = aqConvert.VarToStr(x)
str = VarToStr(x)

VBScript

str = aqConvert.VarToStr(x)
str = VarToStr(x)

DelphiScript

str := aqConvert.VarToStr(x);
str := VarToStr(x);

C++Script, C#Script

str = aqConvert["VarToStr"](x);
str = VarToStr(x);

Members

Example

The following example demonstrates how to use the aqConvert object to convert a floating-point value to a string.

JavaScript, JScript

Log.Message(aqConvert.FloatToStr(154.26));

Python

Log.Message(aqConvert.FloatToStr(154.26))

VBScript

Call Log.Message(aqConvert.FloatToStr(154.26))

DelphiScript

Log.Message(aqConvert.FloatToStr(154.26));

C++Script, C#Script

Log["Message"](aqConvert["FloatToStr"](154.26));

See Also

TestComplete Helper Objects
aqDateTime Object
aqEnvironment Object
aqFile Object
aqFileSystem Object
aqObject Object
aqString Object
aqUtils Object

Highlight search results