pywinauto.uia_element_info

Implementation of the class to deal with an UI element (based on UI Automation API)

class pywinauto.uia_element_info.UIAElementInfo(handle_or_elem=None, cache_enable=False)

UI element wrapper for IUIAutomation API

automation_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

framework_id

Return FrameworkId of the element

classmethod from_point(x, y)
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.
name

Return name of the element

parent

Return parent of the element

process_id

Return ProcessId of the element

rectangle

Return rectangle of the element

rich_text

Return rich_text of the element

runtime_id

Return Runtime ID (hashable value but may be different from run to run)

set_cache_strategy(cached=None)

Setup a cache strategy for frequently used attributes

classmethod top_from_point(x, y)
visible

Check if the element is visible

pywinauto.uia_element_info.elements_from_uia_array(ptrs, cache_enable=False)

Build a list of UIAElementInfo elements from IUIAutomationElementArray