Finally Operation

Applies to TestComplete 14.10, last modified on June 5, 2019

Description

Use the Finally operation along with the Try and Catch operations to implement the structured exception handling mechanism in your keyword tests. The Finally operation groups the operations that will be executed regardless of whether an error occurred within the Try block. In other words, the Finally operation groups the operations that will perform clean-up actions. These operations can, for example, close some open files or connections, close a form of the tested application and so on.

Requirements

The Finally operation must be preceded by the related Try or Catch operations and must reside at the same level.

Operation Result

The operation does not return any value.

Scripting Analogue

The Finally operation is similar to the finally statement of C++, C# or Delphi.

Child Operations

The Finally operation can have any other operations as children.

For information on how to make an operation a child of another operation, see the description of the Keyword Test editor’s Test Steps page.

Operation Parameters

The operation does not have parameters.

See Also

Statements Category
Try Operation
Catch Operation

Highlight search results