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.

do...while

do
{
    // statements
}
while (condition);

Description
Executes the enclosed block of statements first, then evaluates the condition.
If the condition is true, the loop repeats. If false, the loop terminates.
Unlike while, the body is always executed at least once, because the condition is checked after the first iteration.
The break keyword can be used inside the loop body to exit the loop prematurely.

Condition
- The condition must be a boolean expression. It is evaluated after each loop iteration.
- If the condition evaluates to false (or the expression is not of type bool), the loop terminates.

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

Example
void main()
{
    // Body executes at least once
    int i = 0;
    do
    {
        Print(i);
        i++;
    }
    while (i < 5);
    // Output: 0, 1, 2, 3, 4

    // Body runs once even though condition is false
    int x = 10;
    do
    {
        Print(x);
    }
    while (x < 5);
    // Output: 10

    // Example with break
    int y = 0;
    do
    {
        if (y == 3)
        {
            break;
        }
        Print(y);
        y++;
    }
    while (true);
    // Output: 0, 1, 2
}
#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