ZenoTest
ZenoTest is a lightweight and powerful tool for Windows desktop UI test automation. Record, generate, and run automated tests efficiently for WPF, WinForms, and native apps.

for

for (init; condition; increment)
{
    // statements
}

Description
Executes the enclosed block of statements in a loop controlled by three expressions:
- init: Executed once before the loop begins. Typically used to initialize a counter variable.
- condition: Evaluated before each iteration. If true, the body executes. If false, the loop terminates.
- increment: Executed after each iteration of the body. Typically used to update the counter.

All three parts are optional:
- for(;;) creates an infinite loop (equivalent to while(true)).
- Omitting the condition is treated as always true.
The break keyword can be used inside the loop body to exit the loop prematurely.

Special Keywords
- break - Exits the for loop immediately, regardless of the condition.

Example
void main()
{
    // Basic counting loop
    for (int i = 0; i < 5; i++)
    {
        Print(i);
    }
    // Output: 0, 1, 2, 3, 4

    // Prefix increment
    for (int i = 0; i < 5; ++i)
    {
        Print(i);
    }
    // Output: 0, 1, 2, 3, 4

    // Infinite loop with break
    int x = 0;
    for (;;)
    {
        if (x == 3)
        {
            break;
        }
        Print(x);
        x++;
    }
    // Output: 0, 1, 2

    // Sum calculation
    int sum = 0;
    for (int i = 1; i <= 10; i++)
    {
        sum += i;
    }
    // sum == 55

    // Decrement loop
    for (int i = 10; i > 0; i--)
    {
        Print(i);
    }
    // Output: 10, 9, 8, ..., 1
}
#include CloseAUT Console mode do...while DoubleClick Execute Fail File for GetAUTFileVersion GetAUTProductVersion GetAUTQtVersion GetAUTSuspectedCompiler GetAUTSuspectedFramework GetCurrentWorkingDir GetName GetProcessID GetProcessIDHandle GetQtProperty GetText GetValue Handle HasFocus IsAUT64Bit IsChecked IsEnabled IsVisible LeftMouseClick LeftMouseDown LeftMouseUp MiddleMouseDown MiddleMouseUp MouseWheel Pass Predefined Constants Print RightMouseClick RightMouseDown RightMouseUp Script Language SendKeys SendMessage SetFocus SetQtProperty ShellProcess Sleep StartAUT string TerminateProcess TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEndsWith VerifyEqual VerifyExists VerifyGreater VerifyLess VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith while