BuiltIn.SetValue Method

Applies to TestComplete 14.40, last modified on April 22, 2021
This method is obsolete. See the Remarks section below.

Description

Assigns a definite value of the Obj object’s property specified by its name.

Declaration

BuiltIn.SetValue(ObjPropertyNameParam1Param2, ..., Value)

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

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 set.

Param1, Param2, ..., ParamN

Specify the corresponding parameters of the desired property that are needed to set the value.

Value

The value that you want to assign to the property.

Result Value

None.

Remarks

This method is obsolete. It is supported for backward compatibility only. To set the value of an object's property, use the aqObject.SetPropertyValue method.

Example

The following code changes the Caption property of a form:

JavaScript, JScript

var w = p.Window("MainForm", "", 1);
SetValue(w, "Caption", "New Caption");

Python

w = p.Window("MainForm", "", 1)
SetValue(w, "Caption", "New Caption")

VBScript

Set w = p.Window("MainForm", "", 1)
SetValue w, "Caption", "New Caption"

DelphiScript

w := p.Window('MainForm', '', 1);
SetValue(w, 'Caption', 'New Caption');

C++Script, C#Script

var w = p["Window"]("MainForm", "", 1);
BuiltIn["SetValue"](w, "Caption", "New Caption");

See Also

SetPropertyValue Method
GetPropertyValue Method
CallMethod Method
IsSupported Method

Highlight search results