Name Property

Applies to TestComplete 14.72, last modified on April 22, 2021

Description

Use the Name property to obtain the name of the object field that the given aqObjFieldObj object provides information about.

Declaration

aqObjFieldObj.Name

Read-Only Property String
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

A string that holds the field name.

Example

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

JavaScript, JScript

function FieldName()
{

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

Python

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

VBScript

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

DelphiScript

function FieldName;
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().Name);
  
end;

C++Script, C#Script

function FieldName()
{

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

See Also

Category Property
Value Property

Highlight search results