Method Element

Applies to TestComplete 15.47, last modified on January 20, 2023
Description

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

Parent Elements

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

Child Elements

A Method element does not have child elements.

Attributes

The element has the following attributes:

Name

Required. Specifies the name of the method.

Two notes:

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

  • The 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.

Routine

Required. Specifies the script routine that will be executed when a user calls the method in the script code. The routine’s parameters and result value will be used as the method’s parameters and result value.
Element’s Contents

The element may contain text. If it does, this text is displayed as the method’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 objects with script extensions, see Creating Runtime Objects Tutorial.

See Also

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

Highlight search results