1. My code:
print ('##########')
app = pywinauto.application.Application()
window_handle = pywinauto.findwindows.find_windows(title = u'My Dialog Name')
my_handle = window_handle[0]
window = app.window_(handle = my_handle)
for x in window.Children():
print ('Child %s' % x)
print ('##########')
Output:
##########
Child: < pywinauto.controls.HwndWrapper.HwndWrapper object at 0x02C12890>
Child: < pywinauto.controls.win32_controls.ButtonWrapper object at 0x02C12870>
Child: < pywinauto.controls.HwndWrapper.HwndWrapper object at 0x02C128B0>
Child: < pywinauto.controls.win32_controls.StaticWrapper object at 0x02C128F0>
##########
I want the text of Child: pywinauto.controls.win32_controls.StaticWrapper object at 0x02C128F0>. To do so, I need the handle of that static text. I assume that I should be able to derive the handle to the static text from the parent dialog, but I have no idea how. I know that once I have the handle, I can just use window.Texts().
Apologies in advance for the formatting of my question, first timing it here. Thank you for any help.