Statements Category

Applies to TestComplete 15.69, last modified on November 13, 2024

The Statements category contains operations that are similar to various statements of the scripting languages:

Operation Description
Catch Used together with the Try operations. Executes child operations if an error occurred during execution of child operations of the preceding Try operation. Returns the Last result value. The Catch operation is analogue to the catch statement in C++ or JScript or to the except statement in DelphiScript or Python.
Else Acts as a child operation of the If... Then operation. Executes child operations if the condition specified in the preceding If... Then operation is False.
Finally Used together with the Try operations. Executes child operations regardless of possible errors in the preceding Try operation. The Finally operation is analogue to the finally blocks in C++, JScript or Delphi.
For Loop Executes child operations in a loop. This operation is analogue to the for statements of scripting languages.
Go to Label Moves the execution control to the specified Label operation. This operation is analogue to the goto (or jump) statements in some program languages.
Group Used to organize operations in groups.
If... Then Checks the condition and executes child operations if the condition is True. This operation is analogue to the if statement of scripting languages.
Label Marks a particular point in a keyword test.
Return Sets the test’s result value and then exits the test.
Set Variable Value Assigns a value to a keyword test, project, or project suite variable.
Stop Execution Stops the execution of the keyword test unconditionally.
Try Introduces the possibility of “protected” execution. Executes child operations, and if an error occurs, moves the execution flow to the subsequent Catch or Finally operations. The Try operation is analogue to the try statement in JScript, Python or DelphiScript languages.
While Loop Executes child operations in a loop. This operation is analogue to the while statements of scripting languages.

See Also

Operation Reference

Highlight search results