aqObject.GetProperties Method

Applies to TestComplete 15.64, last modified on May 16, 2024


The GetProperties property returns an aqObjIterator object that lists all the properties of the desired object. Use the HasNext, Next and Item methods of the returned aqObjIterator object to iterate through the collection of the object’s properties. Each single property is described by an individual aqObjProperty object.


aqObject.GetProperties(SourceObject, ShowHidden)

SourceObject [in]    Required    Object    
ShowHidden [in]    Optional    Boolean Default value: False   
Result The aqObjIterator object.

Applies To

The method is applied to the following object:


The method has the following parameters:


The object whose properties you want to retrieve. If the specified object was not found, the GetProperties method returns an empty value (that is, Nothing in VBScript, null in JavaScript, JScript, C++Script and C#Script, None in Python and nil in DelphiScript).


Specifies whether to retrieve hidden properties of the object. Hidden properties are those that are displayed in the Object Browser but are not listed in the Code Completion window.

Result Value

The aqObjIterator object whose items are aqObjProperty objects that correspond to the properties of the source object.


The following sample code posts the list of process properties and their values to the log.

JavaScript, JScript

p = Sys.Process("MyApplication");
props = aqObject.GetProperties(p);

while (props.HasNext())
  prop = props.Next();
  Log.Message (prop.Name + ": " + aqConvert.VarToStr(prop.Value));


p = Sys.Process("MyApplication")
props = aqObject.GetProperties(p)
while props.HasNext():
  prop = props.Next()
  Log.Message(prop.Name + ": " + aqConvert.VarToStr(prop.Value))


Set p = Sys.Process("MyApplication")
Set props = aqObject.GetProperties(p)

While props.HasNext
  Set prop = props.Next
  Log.Message prop.Name & ": " & aqConvert.VarToStr(prop.Value)


p := Sys.Process('MyApplication');
props := aqObject.GetProperties (p);

while (props.HasNext) do
  prop := props.Next;
  Log.Message (prop.Name + ': ' + aqConvert.VarToStr(prop.Value));

C++Script, C#Script

p = Sys["Process"]("MyApplication");
props = aqObject["GetProperties"](p);

while (props["HasNext"]())
  prop = props["Next"]();
  Log.Message (prop["Name"] + ": " + aqConvert["VarToStr"](prop["Value"]));

See Also

GetPropertyValue Method
SetPropertyValue Method
GetFields Method
GetMethods Method
GetEvents Method
aqObjIterator Object

Highlight search results