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.

vec2d

Description
Represents a 2-dimensional vector object consisting of two floating-point values (x, y).
vec2d provides arithmetic operators, value assignment, printing and resetting, as well as several vector-specific script methods like normalization, length calculation and null-vector checking.

An vec2d is typically created and manipulated inside scripts when 2D positions, offsets or directions are required.

Methods
normalize()
Normalizes the vector so that its length becomes 1 (unit vector).
If the vector is a null vector, no change is applied.

length()
Returns the floating-point vector length calculated as sqrt(x*x + y*x).

isNull()
Checks whether the vector is a null vector (x = 0 and y = 0).
Returns true if the vector is zero-length.

set(x, y)
Assigns new floating-point values to the vector.
Example: v.set(10.0, 5.0);

Operators
ObjectVec2d supports the operators +, - and * with another vector, returning a new vec2d.

Return
Depends on the method:
void - normalize(), set()
float - length()
bool - isNull()
vec2d - operator results

Example
void main()
{
    vec2d v(3.0, 4.0);
    float len = v.length();
    Print("Length: " + len);
    
    v.normalize();
    Print("Normalized vector length: " + v.length());
    
    bool isZero = v.isNull();
    Print("Is Null Vector: " + isZero);
    
    v.set(10.0, 5.0);
    Print("Vector set to ");
    Print(v);
}
#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