OnIterate Event

Applies to TestComplete 15.20, last modified on January 19, 2022

This event is generated for operations that execute child operations in a loop. The OnIterate event occurs at the end of each iteration to determine whether the test engine should exit the loop.

Declaration

OnIterate(Data) Parameters
Data [in] Required Object

Description

The OnIterate event occurs when an operation-iterator is executed during the test run. The event is generated at the end of each iteration. Operation developers write the OnIterate event handler to update internal counters or check specific conditions.

Parameters

The event has the following parameters:

Data

An object that provides access to the operation fields. This object contains properties that correspond to individual operation fields and whose names coincide with the field names.

Return Value

The OnIterate event handler does not return any value.

Remarks

The OnIterate event is triggered at the end of each iteration. If the CanExecuteBody event handler returns False, the iteration does not occur and the OnIterate event is not triggered. The sequence of events at run time is as follows:

OnExecute (triggered only once, before the first iteration)

CanExecuteBody (on each iteration)

Run child operations…

OnIterate

See Also

Events Reference
OnCreate Event
OnSetup Event
Creating Keyword Test Operations

Highlight search results