OnIterate Event

Applies to TestComplete 15.42, last modified on August 01, 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.


OnIterate(Data) Parameters
Data [in] Required Object


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.


The event has the following parameters:


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.


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…


See Also

Events Reference
OnCreate Event
OnSetup Event
Creating Keyword Test Operations

Highlight search results