BuiltIn.GetValue Method

Applies to TestComplete 15.47, last modified on January 20, 2023
This method is obsolete. See the Remarks section below.

Description

Returns the value of the Obj object’s property specified by its name.

Declaration

BuiltIn.GetValue(Obj, PropertyName, Param1, Param2, ...)

Obj [in]    Required    Variant    
PropertyName [in]    Required    String    
Param1 [in]    Optional    Variant    
Param2 [in]    Optional    Variant    
...
Result Variant

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

Obj

The object to which the desired property belongs.

PropertyName

The name of the property whose value you want to get.

Param1, Param2, ..., ParamN

Specify the corresponding parameters of the desired property.

Result Value

The value of the specified object property.

Remarks

This method is obsolete. It is supported for backward compatibility only. To get the value of an object’s certain property, use the aqObject.GetPropertyValue method.

Example

The following code returns the Caption property of a form:

JavaScript, JScript

var w = p.Window("MainForm", "", 1);
Log.Message(GetValue(w, "Caption"));

Python

w = p.Window("MainForm", "", 1)
Log.Message(GetValue(w, "Caption"))

VBScript

Set w = p.Window("MainForm", "", 1)
Log.Message GetValue(w, "Caption")

DelphiScript

w := p.Window('MainForm', '', 1);
Log.Message(GetValue(w, 'Caption'));

C++Script, C#Script

var w = p["Window"]("MainForm", "", 1);
Log["Message"](BuiltIn["GetValue"](w, "Caption"));

See Also

GetPropertyValue Method
SetPropertyValue Method
CallMethod Method
IsSupported Method

Highlight search results