Wait
flaui.core.input.Wait
Various helper tools used in various places, wrapper over Wait class in FlaUI.Core.Input namespace
until_input_is_processed(wait_timeout_in_secs=None)
staticmethod
Waits a little to allow inputs (mouse, keyboard, ...) to be processed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wait_timeout_in_secs
|
Optional[float]
|
An optional timeout. If no value or None is passed, the timeout is 100ms. |
None
|
Source code in flaui/core/input.py
until_responsive(automation_element, timeout_in_secs=None)
staticmethod
Waits until the given element is responsive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
automation_element
|
AutomationElement
|
The element that should be waited for. |
required |
timeout_in_secs
|
Optional[float]
|
The timeout of the waiting. |
None
|
Returns:
| Type | Description |
|---|---|
|
True if the element was responsive, false otherwise. |
Source code in flaui/core/input.py
until_responsive_hwnd(hWnd, timeout=None)
staticmethod
Waits until the given hwnd is responsive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hWnd
|
Any
|
The hwnd that should be waited for. |
required |
timeout
|
Optional[float]
|
The timeout of the waiting. |
None
|
Returns:
| Type | Description |
|---|---|
|
True if the hwnd was responsive, false otherwise. |
Source code in flaui/core/input.py
while_cursor_is_busy(timeout_in_secs=30.0, poll_interval_secs=0.1)
staticmethod
Wait while the global mouse cursor shows a busy/loading state.
Many large desktop applications show the wait (hourglass/spinner) or app-starting cursor
while a new window loads its data. Calling this after navigating between screens avoids the
sync issues that WaitWhileBusy / UntilResponsive miss, by polling the actual cursor
the OS is showing until it returns to a non-busy shape (or the timeout elapses).
Implemented in pure Python via Win32 GetCursorInfo (no C# dependency), per the project's
preference for Python for non-core system utilities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout_in_secs
|
float
|
Maximum time to wait for the cursor to become idle. |
30.0
|
poll_interval_secs
|
float
|
How often to poll the cursor state, in seconds. |
0.1
|
Returns:
| Type | Description |
|---|---|
bool
|
|