AutomationBase and UIA facades
flaui.core.automation_base.AutomationBase
Bases: BaseModel
Delegates to a C# FlaUI.Core.AutomationBase instance (UIA2 or UIA3).
automation_type
property
Return UIA2 or UIA3 for this automation stack.
coalesce_events
property
writable
Get coalesce-events option (C# enum).
condition_factory
property
Return a Python wrapper around the C# ConditionFactory.
connection_recovery_behavior
property
writable
Get connection recovery behavior (C# enum).
connection_timeout
property
writable
Get the C# connection timeout (TimeSpan).
event_library
property
Return the C# event identifier library.
mixed_attribute_value
property
Return the sentinel for mixed text attributes.
not_supported_value
property
Return the provider-specific sentinel for unsupported values.
overlay_manager
property
Return a Python wrapper around the C# overlay manager (visual-debugging overlays).
pattern_library
property
Return the C# pattern identifier library.
property_library
property
Return the C# property identifier library.
text_attribute_library
property
Return the C# text attribute library.
transaction_timeout
property
writable
Get the C# transaction timeout (TimeSpan).
tree_walker_factory
property
Return the C# tree walker factory.
compare(element1, element2)
Return whether two elements refer to the same underlying UI element.
Source code in flaui/core/automation_base.py
dispose()
focused_element()
Return the currently focused element, or None when the provider has no focus.
Source code in flaui/core/automation_base.py
from_handle(hwnd)
Return the element for a window handle (HWND).
Source code in flaui/core/automation_base.py
from_point(point)
Return the element at the given screen point.
Source code in flaui/core/automation_base.py
get_desktop()
Return the desktop (root) element as a Python AutomationElement.
Source code in flaui/core/automation_base.py
register_focus_changed_event(action)
Register a focus-changed handler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
Any
|
Callback |
required |
Returns:
| Type | Description |
|---|---|
Any
|
An :class: |
Source code in flaui/core/automation_base.py
unregister_all_events()
unregister_focus_changed_event(event_handler)
Unregister a focus-changed handler returned by :meth:register_focus_changed_event.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_handler
|
Any
|
The :class: |
required |
Source code in flaui/core/automation_base.py
validate_raw_automation(v, info)
classmethod
Reject a missing C# automation reference.
Source code in flaui/core/automation_base.py
flaui.core.automation_base.wrap_cs_automation(raw)
Wrap an existing C# AutomationBase (e.g. from AutomationElement.Automation) in Python.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw
|
Any
|
C# FlaUI.Core.AutomationBase implementation instance |
required |
Returns:
| Type | Description |
|---|---|
AutomationBase
|
UIA2Automation or UIA3Automation Python wrapper |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the object is not a supported automation implementation |
ValueError
|
If raw is None |
Source code in flaui/core/automation_base.py
flaui.uia2.automation.UIA2Automation(raw_automation=None)
Bases: AutomationBase
UIA2 automation stack; wraps a C# FlaUI.UIA2.UIA2Automation instance.
Create a UIA2 wrapper, constructing C# UIA2Automation when raw_automation is omitted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw_automation
|
Optional[Any]
|
Existing C# UIA2Automation instance, or None to construct one |
None
|
Source code in flaui/uia2/automation.py
flaui.uia3.automation.UIA3Automation(raw_automation=None)
Bases: AutomationBase
UIA3 automation stack; wraps a C# FlaUI.UIA3.UIA3Automation instance.
Create a UIA3 wrapper, constructing C# UIA3Automation when raw_automation is omitted.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
raw_automation
|
Optional[Any]
|
Existing C# UIA3Automation instance, or None to construct one |
None
|