Search code examples
pythonpywinauto

Getting window's properties using pywinauto


Is there a way to get window's properties like: title and control_type using pywinauto?

Because it seems that you can search windows by them, but there's no window attribute that points to these properties.


Solution

  • It's possible through .element_info member of wrapper. But there are inconsistencies for some properties. Say you can access .element_info.name instead of .element_info.title. But .element_info.control_type is consistent as well as .element_info.class_name.

    Will think about aligning them in next release. Thanks for the feedback!