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.

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
- Multi-branch selection using switch / case / default / break
- 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.
- switch statements allow multi-way branching based on the value of an expression.
  Each case represents a possible value to match, and break ends the execution of a case.
  default is executed if no case matches.
- 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.
- switch, case, default, break - Multi-branch control flow.

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");
    }

    int value = 2;
    switch(value)
    {
        case 1:
            Pass("Value is 1");
            break;
        case 2:
            Pass("Value is 2");
            break;
        default:
            Fail("Value is unknown");
    }
}

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.
#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 ShellProcess Sleep StartAUT string TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEndsWith VerifyEqual VerifyExists VerifyGreater VerifyLess VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith