Здесь это мой код
Код: Выделить всё
from pywinauto import Application
from pywinauto.keyboard import send_keys
app = Application().start(r"C:\Users\test\Documents\FileTest.exe")
dlg = app.window(title_re=".*FileTest.*")
tab_control = dlg['TabControl']
tab_control.select('ReadWrite')
dlg['ReadFile Button'].click()
get_object = dlg[':DataEditor']
get_value = get_object.window_text()
print(f"get_value: {get_value}")
print("Automation complete and operation completed successfully!")
Я прикрепил изображение filetest.exe и проверьте элемент filetest .exe


Подробнее здесь: https://stackoverflow.com/questions/790 ... -pywinauto