Category Property

Applies to TestComplete 15.63, last modified on April 23, 2024

Description

The Category property returns a string value that corresponds to the access type of the field that the given aqObjFieldObj object provides information about.

Declaration

aqObjFieldObj.Category

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

The property returns one of the following strings that specify the field’s access type:

  • private
  • protected
  • public

Example

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

JavaScript, JScript

function FieldCategory()
{

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

Python

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

VBScript

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

DelphiScript

function FieldCategory;
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().Category);
  
end;

C++Script, C#Script

function FieldCategory()
{

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

See Also

Name Property
Value Property

Highlight search results