Property Element

Applies to TestComplete 15.70, last modified on December 17, 2024
Description

The Property element is used in the description.xml file. The element corresponds to a property of a custom scripting object defined in the description file.

Parent Elements

A Property element must be a child of the RuntimeObject element.

Child Elements

A Property element does not have child elements.

Attributes

The element has the following attributes:

Name

Required. Specifies the name of the property.

The name must be unique among other properties and methods of the object, to which the property belongs.

The property name must be a valid identifier for any scripting language supported by TestComplete. To match this rule, the name must start with a letter and contain only letters, digits and underscore characters.

GetRoutine

Optional. Specifies the script routine that will work as the “get” function of the property and will return the property’s value. Parameters of the script routine are treated as the property indexes. The result of the routine is used as the property value.

SetRoutine

Optional. Specifies the script routine that will work as the “set” function of the property and will be used to assign a value to the property. The script routine must have at least one parameter that will be treated as the parameter that specifies the property value. If the routine has several parameters then the last parameter is considered as the parameter that contains the property value to be assigned and the other parameters are treated as the property’s indexes.
 
Either GetRoutine, or SetRoutine or both of these attributes must be specified in the description.xml file.
Element’s Contents

The element may contain text. If it does, then this text is displayed as the property’s description in the TestComplete Code Completion window.

Remarks

For information about scripting objects that can be used in the extension’s script code, see Objects Available to Script Extensions. For an example of creating custom scripting object with script extensions, see Creating Runtime Objects Tutorial.

See Also

Elements Reference
Structure of the Description File
Creating Runtime Objects
Creating Object Properties
Objects Available to Script Extensions
Creating Runtime Objects Tutorial

Highlight search results