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>
tryWaitForInputIdle(milliseconds) → {Promise.<boolean>}
Waits until the object is ready for input or the timeout expires.
Note: This method is not supported when you enable the legacy UIA Pro Add-in.
Parameters:
| Name | Type | Description |
|---|---|---|
milliseconds |
number | The number of milliseconds to wait for the object to become ready. |
Returns:
a promise that is fulfilled with the values 'True' if the window is ready for input or 'False' if the timeout expired.
- Type
- Promise.<boolean>
waitForInputIdle(milliseconds) → {Promise.<void>}
Waits until the object is ready for input or the timeout expires.
Note: This method is only supported when you enable the legacy UIA Pro Add-in.
Parameters:
| Name | Type | Description |
|---|---|---|
milliseconds |
number | The number of milliseconds to wait for the object to become ready. |
- Deprecated:
- Yes
Returns:
a promise that is fulfilled.
- Type
- Promise.<void>