pywinauto.windows.uia_element_info¶
Implementation of the class to deal with an UI element (based on UI Automation API)
- class
pywinauto.windows.uia_element_info.
UIAElementInfo
(handle_or_elem=None, cache_enable=False)¶UI element wrapper for IUIAutomation API
accelerator
¶Return accelerator key for the element (try to use access_key property in case of empty value)
access_key
¶Return access key for the element. Most preferred way to get keyboard shortcut
auto_id
¶Return AutomationId of the element
children
(**kwargs)¶Return a list of only immediate children of the element
- kwargs is a criteria to reduce a list by process, class_name, control_type, content_only and/or title.
class_name
¶Return class name of the element
control_id
¶Return ControlId of the element if it has a handle
control_type
¶Return control type of element
descendants
(**kwargs)¶Return a list of all descendant children of the element
- kwargs is a criteria to reduce a list by process, class_name, control_type, content_only and/or title.
dump_window
()¶Dump window to a set of properties
element
¶Return AutomationElement’s instance
enabled
¶Check if the element is enabled
exact_only_props
= ['handle', 'pid', 'control_id', 'enabled', 'visible', 'rectangle', 'framework_id', 'runtime_id']¶
framework_id
¶Return FrameworkId of the element
- classmethod
from_point
(x, y)¶Return child element at specified point coordinates
- classmethod
get_active
()¶Return current active element
handle
¶Return handle of the element
iter_children
(**kwargs)¶Return a generator of only immediate children of the element
- kwargs is a criteria to reduce a list by process, class_name, control_type, content_only and/or title.
iter_descendants
(**kwargs)¶Iterate over descendants of the element
legacy_action
¶Return DefaultAction value of the element from LegacyIAccessible pattern
legacy_descr
¶Return description of the element from LegacyIAccessible pattern
legacy_help
¶Return help string of the element from LegacyIAccessible pattern
legacy_name
¶Return name of the element from LegacyIAccessible pattern
legacy_shortcut
¶Return keyboard shortcut of the element from LegacyIAccessible pattern
legacy_value
¶Return value of the element from LegacyIAccessible pattern
name
¶Return name of the element
parent
¶Return parent of the element
pid
¶Return ProcessId of the element
process_id
¶Return ProcessId of the element
re_props
= ['class_name', 'name', 'auto_id', 'control_type', 'full_control_type', 'access_key', 'accelerator', 'value', 'legacy_action', 'legacy_descr', 'legacy_help', 'legacy_name', 'legacy_shortcut', 'legacy_value']¶
rectangle
¶Return rectangle of the element
renamed_props
= {'title': ('name', None), 'title_re': ('name_re', None), 'process': ('pid', None), 'visible_only': ('visible', {True: True, False: None}), 'enabled_only': ('enabled', {True: True, False: None}), 'top_level_only': ('depth', {True: 1, False: None})}¶
rich_text
¶Return rich_text of the element
runtime_id
¶Return Runtime ID (hashable value but may be different from run to run)
search_order
= ['handle', 'control_type', 'class_name', 'pid', 'control_id', 'visible', 'enabled', 'name', 'access_key', 'accelerator', 'auto_id', 'full_control_type', 'rectangle', 'framework_id', 'runtime_id', 'value', 'legacy_action', 'legacy_descr', 'legacy_help', 'legacy_name', 'legacy_shortcut', 'legacy_value']¶
set_cache_strategy
(cached=None)¶Setup a cache strategy for frequently used attributes
- classmethod
top_from_point
(x, y)¶Return top level element at specified point coordinates
use_raw_view_walker
= False¶Enable/disable RawViewWalker-based implementation (can find more elements in some cases, but slow)
value
¶Return value of the element from ValuePattern (in order to search elements by this property)
visible
¶Check if the element is visible
pywinauto.windows.uia_element_info.
elements_from_uia_array
(ptrs, cache_enable=False)¶Build a list of UIAElementInfo elements from IUIAutomationElementArray
pywinauto.windows.uia_element_info.
is_element_satisfying_criteria
(element, process=None, class_name=None, name=None, control_type=None, content_only=None, **kwargs)¶Check if element satisfies filter criteria