$get Method

Applies to TestComplete 14.0, last modified on January 23, 2019

Description

In JavaScript code, you can use $get to get an object’s property value given the property name as a string. $get works similar to aqObject.GetPropertyValue, but is easier to use in JavaScript.

Declaration

Obj.$get(PropertyNameParam1Param2, ..., ParamN)

Obj Any object that supports the IDispatch interface
PropertyName [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.

Parameters

PropertyName

A string containing the name of the property whose value you want to get.

Param1, Param2, ..., ParamN

If the property has parameters, such as property(param1, param2), specify the parameter values.

Result Value

The value of the specified property.

Example

JavaScript

let username = Sys.$get("UserName");
Log.Message(username);

See Also

$call Method
$set Method
JavaScript - Specifics of Usage

Highlight search results