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 abs Array ceil CloseAUT Console mode do...while DoubleClick DragAndDrop Execute Fail File floor for Format GetAUTFileVersion GetAUTProductVersion GetAUTQtVersion GetAUTSuspectedCompiler GetAUTSuspectedFramework GetClipboard GetCurrentDate GetCurrentTime GetCurrentWorkingDir GetEnv GetName GetProcessID GetProcessIDHandle GetQtProperty GetText GetTimestamp GetValue Handle HasFocus IsAUT64Bit IsChecked IsEnabled IsVisible LeftMouseClick LeftMouseDown LeftMouseUp max MiddleMouseClick MiddleMouseDown MiddleMouseUp min MouseMove MouseWheel Pass pow Predefined Constants Print rand Regex RegexMatch RightMouseClick RightMouseDown RightMouseUp round Script Language SendKeys SendMessage SetClipboard SetFocus SetNotFoundBehavior SetQtProperty ShellProcess Sleep sqrt srand StartAUT string TerminateProcess TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEmpty VerifyEndsWith VerifyEqual VerifyExists VerifyFalse VerifyGreater VerifyGreaterEqual VerifyLess VerifyLessEqual VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith VerifyTrue WaitForControl WaitUntilEnabled WaitUntilVisible while