$call Method

Applies to TestComplete 15.65, last modified on July 17, 2024


In JavaScript code, you can use $call to call an object’s method given the method name as a string.

$call works similar to aqObject.CallMethod, but is easier to use in JavaScript.


Obj.$call(MethodName, Param1, Param2, ..., ParamN)

Obj Any object that supports the IDispatch interface
MethodName [in]    Required    String    
Param1 [in]    Optional    Variant    
Param2 [in]    Optional    Variant    
ParamN [in]    Optional    Variant    
Result Variant

Applies To

IDispatch objects, for example, TestComplete scripting objects (Sys, Log), test objects obtained from applications (Aliases.browser), COM objects, and others.



A string containing the name of the method to be called.

Param1, Param2, ..., ParamN

If the called method has parameters, specify the parameter values.

Result Value

The return value of the called method, or undefined if the method did not return anything.



Log.$call("Message", "test");

See Also

$get Method
$set Method
JavaScript - Specifics of Usage

Highlight search results