Applies to TestComplete 14.40, last modified on June 16, 2020


In Python code, you can use __getprop__ to get an object’s property value given the property name as a string. __getprop__ works similar to aqObject.GetPropertyValue, but is easier to use in Python.


Obj.__getprop__(PropertyNameParam1Param2, ..., ParamN)

Obj Any object that supports the IDispatch interface
PropertyName [in]    Required    String    
Param1 [in]    Optional    Variant    
Param2 [in]    Optional    Variant    
ParamN [in]    Optional    Variant    
Result Variant

Applies To

IDispatch objects, for example, TestComplete scripting objects (Sys, Log), test objects obtained from applications (Aliases.browser), COM objects, and others.



A string containing the name of the property whose value you want to get.

Param1, Param2, ..., ParamN

If the property has parameters, such as property[param1, param2], specify the parameter values.

Result Value

The property value.


__getprop__ is the only way to get the value of a parameterized property using the default parameter values. Instead of[]

you must use




def Test():
  username = Sys.__getprop__("UserName")

See Also

__callmethod__ Method
__setprop__ Method
Python - Specifics of Usage

Highlight search results