WindowPattern

Supported in UFT Developer version 2023 and later

UIA Pro is supported as a technical preview.

UIAPro. WindowPattern

new WindowPattern()

The UIA Pro Window pattern.

Methods

canMaximize() → {Promise.<boolean>}

Indicates whether the window can be maximized.

Returns:

a promise that is fulfilled with an indication of whether the object can be maximized.
Type
Promise.<boolean>

canMinimize() → {Promise.<boolean>}

Indicates whether the window can be minimized.

Returns:

a promise that is fulfilled with an indication of whether the object can be minimized.
Type
Promise.<boolean>

close() → {Promise.<void>}

Attempts to close the current window.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

getWindowInteractionState() → {Promise.<WindowInteractionState>}

Gets the UIAPro.WindowPattern.WindowInteractionState of the UIA Pro element.

Returns:

a promise that is fulfilled with the interaction state value.
Type
Promise.<WindowInteractionState>

getWindowVisualState() → {Promise.<boolean>}

Gets the UIAPro.WindowPattern.WindowVisualState of the UIA Pro element.

Returns:

a promise that is fulfilled with the visual state value.
Type
Promise.<boolean>

isMaximized() → {Promise.<void>}

Indicates whether the UIA Pro visual state is UIAPro.WindowPattern.WindowVisualState.maximized.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

isMinimized() → {Promise.<void>}

Indicates whether the UIA Pro visual state is UIAPro.WindowPattern.WindowVisualState.minimized.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

isModal() → {Promise.<boolean>}

Indicates whether the UIA Pro element is modal.

Returns:

a promise that is fulfilled with an indication of whether the object is modal.
Type
Promise.<boolean>

isTopMost() → {Promise.<boolean>}

Indicates whether the UIA Pro element is the topmost element in the z-order.

Returns:

a promise that is fulfilled with an indication of whether the object is the topmost element in the z-order.
Type
Promise.<boolean>

maximize() → {Promise.<void>}

Sets the window visual state to UIAPro.WindowPattern.WindowVisualState.maximized.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

minimize() → {Promise.<void>}

Sets the window visual state to UIAPro.WindowPattern.WindowVisualState.minimized.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

restore() → {Promise.<void>}

Sets the window visual state to UIAPro.WindowPattern.WindowVisualState.normal.

Returns:

a promise that is fulfilled.
Type
Promise.<void>

waitForInputIdle(milliseconds) → {Promise.<void>}

Causes the calling code to block for the specified time or until the associated process enters an idle state, whichever completes first.

Parameters:

NameTypeDescription
millisecondsnumberThe amount of time, in milliseconds, to wait for the associated process to become idle.

Returns:

a promise that is fulfilled.
Type
Promise.<void>