How can i find available dialogs ,controls of an application in pywinauto?

14,354

This is working for me. Source: http://pywinauto.github.io/docs/getting_started.html

from pywinauto import application

app = application.Application.Start("Notepad.exe")
app.Notepad.print_control_identifiers()
app.Notepad.MenuSelect("Edit->Replace")
app.Replace.print_control_identifiers()

Or you can use Swapy to see all controls and class names

enter image description here

Share:
14,354
IordanouGiannis
Author by

IordanouGiannis

Updated on June 13, 2022

Comments

  • IordanouGiannis
    IordanouGiannis almost 2 years

    I am using pywinauto in windows 7 and I am searching for a way to find the available dialogs and controls of an application.The following is an example:

    from pywinauto import application
    import time
    
    app=application.Application()
    app.connect_(title_re = ".*Notepad", class_name = "Notepad")
    

    You can start or connect to an application with pywinauto.But I don't know how can I find whats available in notepad.Any ideas ? Thanks.

  • Arkady
    Arkady about 9 years
    that doesn't work. TypeError: '_DynamicAttributes' object is not callable