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.

SetQtProperty

void SetQtProperty(string control, string property, string value)
void SetQtProperty(string control, string property, int value)
void SetQtProperty(string control, string property, bool value)

Description
Sets a Qt widget property by locating the corresponding UIAutomation element in the application, determining its screen coordinates and class type.
Supported value types are string, integer, and boolean. If any lookup, type conversion, or communication step fails, the script is aborted and an error is logged.

Typical use cases
Updating visual Qt widget values (e.g., filling text fields, checking/unchecking checkboxes).
Modifying state or properties not directly exposed by UIAutomation.
Performing automated input or configuration changes in Qt-based applications.

Parameters
control - Name/identifier of the UI element to modify.
property - Property name to set on the Qt widget.
value - Value to assign to the property. Can be string, int, or bool.

Returns
boolean - true if the property was successfully set. On failure, the script is aborted and the return value is undefined.

Example
void main()
{
    // Set string value
    SetQtProperty("TXT_USERNAME", "value", "JohnDoe");

    // Set integer value
    SetQtProperty("SPN_AGE", "value", 42);

    // Set boolean value
    SetQtProperty("CHK_REMEMBER_ME", "checked", true);
}
#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 SetGlobal 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