Value Property

Applies to TestComplete 12.60, last modified on September 17, 2018

Description

Use the Value property to set or get the value of the field about which the given aqObjFieldObj object provides information.

Declaration

aqObjFieldObj.Value

Read-Write Property Variant
aqObjFieldObj An expression, variable or parameter that specifies a reference to an aqObjField object

Applies To

The property is applied to the following object:

Property Value

The field value.

Example

The code below obtains the fields collection that belongs to the specified object and posts the fields values to the test log.

JavaScript, JScript

function FieldValue()
{

  // Specifies the object
  var Obj = Sys.Process("MyApplication");
  
  // Obtains the fields collection
  var FieldCol = aqObject.GetFields(Obj);
  
  while ( FieldCol.HasNext() )
    Log.Message(FieldCol.Next().Value);
  
}

Python

def FieldValue():
  # Specifies the object
  Obj = Sys.Process("MyApplication")
  # Obtains the fields collection
  FieldCol = aqObject.GetFields(Obj)
  while FieldCol.HasNext():
    Log.Message(FieldCol.Next().Value)

VBScript

Sub FieldValue
  
  ' Specifies the object
  Set Obj = Sys.Process("MyApplication")
  
  ' Obtains the fields collection
  Set FieldCol = aqObject.GetFields(Obj)
  
  While FieldCol.HasNext
    Log.Message FieldCol.Next.Value
  WEnd
  
End Sub

DelphiScript

function FieldValue;
var Obj, FieldCol;
begin

  // Specifies the object
  Obj := Sys.Process('MyApplication');
  
  // Obtains the fields collection
  FieldCol := aqObject.GetFields(Obj);
  
  while ( FieldCol.HasNext() ) do
    Log.Message(FieldCol.Next().Value);
  
end;

C++Script, C#Script

function FieldValue()
{

  // Specifies the object
  var Obj = Sys["Process"]("MyApplication");
  
  // Obtains the fields collection
  var FieldCol = aqObject["GetFields"](Obj);
  
  while ( FieldCol["HasNext"]() )
    Log["Message"]( FieldCol["Next"]()["Value"] );
  
}

See Also

Category Property
Name Property

Highlight search results