WindowRef#

class omni.kit.ui_test.WindowRef(widget: WindowHandle, path: str)#

Bases: WidgetRef

Reference to `omni.ui.WindowHandle`.

Parameters:
  • widget (ui.WindowHandle) – The window handle widget to reference.

  • path (str) – The path where the window was found.

Methods

__init__(widget, path)

Creates a reference to a window handle for UI testing.

Attributes

position

Gets the window's position as screen coordinates.

size

Gets the window's dimensions.

__init__(widget: WindowHandle, path: str)#

Creates a reference to a window handle for UI testing.

property position: Vec2#

Gets the window’s position as screen coordinates.

Returns:

The position of the window’s top-left corner in pixels.

Return type:

Vec2

property size: Vec2#

Gets the window’s dimensions.

Returns:

The width and height of the window in pixels.

Return type:

Vec2