ZenoTest — Windows Desktop UI Test Automation
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.

Script Language

Description
The Script Language is a lightweight, C-like scripting language designed for automated testing and system interaction.
It supports typed variables, conditional logic, functions, and integration with predefined automation methods (e.g., Pass, Fail, Execute).
Scripts are executed line by line, with clear syntax and structured blocks using curly braces.

Key Features
- Strongly typed variables (bool, int, float, string, etc.)
- Conditional logic with if / else statements
- Function definitions with return values
- Built-in methods for test verification and result reporting
- Automatic type checking and expression evaluation
- Simple syntax similar to C / C++ for easy readability

Supported Data Types
- void - No return value (used for main or utility functions)
- bool - Boolean values (true / false)
- byte - 8-bit unsigned integer (0-255)
- int8 - 8-bit signed integer (-128-127)
- int - Standard integer type
- float - Floating-point number
- string - Unicode text

Control Flow
if and else statements allow conditional branching based on logical expressions.
Curly braces are required to define code blocks.

Operators
- Arithmetic: +, -, *, /
- Comparison: ==, !=, <, <=, >, >=
- Logical: !, &&, ||

Special Keywords
- return - Return a value from a function.
- true, false - Boolean constants.

Functions
Functions are declared using a return type, a name, and parentheses with optional parameters.
Each script must contain a main() function as its entry point.

Example
void main()
{
    string name = "World";
    if (name == "World")
    {
        Pass("Hello " + name);
    }
    else
    {
        Fail("Unexpected value");
    }
}

Typical Use Cases
- Automated GUI testing
- Verifying functional behavior of desktop applications
- Running command-line based system tests
- Creating reusable test logic via user-defined functions

Notes
- Script execution always begins in void main().
- Most automation-related methods (e.g., mouse or keyboard functions) require an active AUT (Application Under Test).
- Scripts stop immediately after calling Fail() or Pass().
- The language is case-sensitive.

Example Script
void main()
{
    int a = 5;
    int b = 10;
    if (a < b)
    {
        Pass("Comparison successful");
    }
    else
    {
        Fail("Comparison failed");
    }
}

Returns
- void - The script language itself has no return value.

#include CloseAUT Console mode DoubleClick Execute Fail File GetAUTFileVersion GetAUTProductVersion GetAUTQtVersion GetAUTSuspectedCompiler GetAUTSuspectedFramework GetCurrentWorkingDir GetName GetQtProperty GetText GetValue HasFocus IsAUT64Bit IsChecked IsEnabled IsVisible LeftMouseClick LeftMouseDown LeftMouseUp MiddleMouseDown MiddleMouseUp MouseWheel Pass Print RightMouseClick RightMouseDown RightMouseUp Script Language SendKeys SetFocus SetQtProperty Sleep StartAUT string TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEndsWith VerifyEqual VerifyExists VerifyGreater VerifyLess VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith