+
+ +
+

pywinauto.findwindows

+
+

Provides functions for iterating and finding windows/elements

+
+
+exception pywinauto.findwindows.ElementAmbiguousError
+

There was more then one element that matched

+
+ +
+
+exception pywinauto.findwindows.ElementNotFoundError
+

No element could be found

+
+ +
+
+exception pywinauto.findwindows.WindowAmbiguousError
+

There was more then one window that matched

+
+ +
+
+exception pywinauto.findwindows.WindowNotFoundError
+

No window could be found

+
+ +
+
+pywinauto.findwindows.enum_windows()
+

Return a list of handles of all the top level windows

+
+ +
+
+pywinauto.findwindows.find_element(**kwargs)
+

Call find_elements and ensure that only one element is returned

+

Calls find_elements with exactly the same arguments as it is called with +so please see find_elements() for the full parameters description.

+
+ +
+
+pywinauto.findwindows.find_elements(class_name=None, class_name_re=None, parent=None, process=None, title=None, title_re=None, top_level_only=True, visible_only=True, enabled_only=False, best_match=None, handle=None, ctrl_index=None, found_index=None, predicate_func=None, active_only=False, control_id=None, control_type=None, auto_id=None, framework_id=None, backend=None, depth=None)
+

Find elements based on criteria passed in

+

WARNING! Direct usage of this function is not recommended! It’s a very low level API. +Better use Application and WindowSpecification objects described in the +Getting Started Guide.

+

Possible values are:

+
    +
  • class_name Elements with this window class
  • +
  • class_name_re Elements whose class matches this regular expression
  • +
  • parent Elements that are children of this
  • +
  • process Elements running in this process
  • +
  • title Elements with this text
  • +
  • title_re Elements whose text matches this regular expression
  • +
  • top_level_only Top level elements only (default=**True**)
  • +
  • visible_only Visible elements only (default=**True**)
  • +
  • enabled_only Enabled elements only (default=False)
  • +
  • best_match Elements with a title similar to this
  • +
  • handle The handle of the element to return
  • +
  • ctrl_index The index of the child element to return
  • +
  • found_index The index of the filtered out child element to return
  • +
  • predicate_func A user provided hook for a custom element validation
  • +
  • active_only Active elements only (default=False)
  • +
  • control_id Elements with this control id
  • +
  • control_type Elements with this control type (string; for UIAutomation elements)
  • +
  • auto_id Elements with this automation id (for UIAutomation elements)
  • +
  • framework_id Elements with this framework id (for UIAutomation elements)
  • +
  • backend Back-end name to use while searching (default=None means current active backend)
  • +
+
+ +
+
+pywinauto.findwindows.find_window(**kwargs)
+

Call find_elements and ensure that only handle of one element is returned

+

Calls find_elements with exactly the same arguments as it is called with +so please see find_elements() for the full parameters description.

+
+ +
+
+pywinauto.findwindows.find_windows(**kwargs)
+

Find elements based on criteria passed in and return list of their handles

+

Calls find_elements with exactly the same arguments as it is called with +so please see find_elements() for the full parameters description.

+
+ +
+
+ + +
+ +