ZenoTest
ZenoTest — Windows Desktop UI Testautomatisierung für Qt, WPF, WinForms & native Apps. Aufzeichnen, skripten und automatisierte GUI-Tests mit CI/CD-Integration ausführen.

SetNotFoundBehavior

void SetNotFoundBehavior(int mode)

Description
Configures the behavior of all subsequent script methods when a UI control cannot be found.
By default (NOTFOUND_ABORT), the test execution is stopped immediately when an element is not found.
Setting the mode to NOTFOUND_WARN causes the method to log a warning instead and continue the test execution.

Parameter
- mode - The behavior mode. Use one of the predefined constants:
    NOTFOUND_ABORT - Abort the test if an element is not found (default).
    NOTFOUND_WARN - Log a warning and continue execution if an element is not found.

Return
- void

Example
void main()
{
    // Switch to warning mode - missing controls no longer abort the test
    SetNotFoundBehavior(NOTFOUND_WARN);

    LeftMouseClick("myOptionalButton"); // logs warning if not found, continues

    // Restore default abort behavior
    SetNotFoundBehavior(NOTFOUND_ABORT);

    LeftMouseClick("myRequiredButton"); // aborts if not found
}
#define #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 rand RightMouseClick RightMouseDown RightMouseUp Script Language SendKeys SendMessage SetFocus SetNotFoundBehavior SetQtProperty ShellProcess Sleep StartAUT string TerminateProcess TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEndsWith VerifyEqual VerifyExists VerifyGreater VerifyLess VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith while