I am new to Pywinauto and trying to click "ENTER" after I login to remote desktop application. The desktop window has an usage disclaimer with "OK" button and I can either press "ENTER" or mouse move to click "OK". Below is the code snippet and the error which I am getting.
rem_app = Application(backend="uia").connect(title_re='.*Remote desktop.*')
dlg_rem = rem_app.window(title_re='.*Remote desktop.*')
dlg_rem.set_focus()
dlg_rem.typekeys('{ENTER}')
Error: Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\pywinauto\application.py", line 171, in call format(self.criteria[-1]['best_match'])) AttributeError: WindowSpecification class has no 'typekeys' method
I have also used the below by looking into other related stackoverflow questions:
- keyboard.sendkeys('{ENTER}')
- dlg_rem.sendkeys('{ENTER}')
Here's what print_control_identifiers() describes about the "OK" button.
| | | | Pane - '' (L403, T360, R1671, B1320)
| | | | [u'3', 'Pane4']
| | | | |
| | | | | Pane - 'Input Capture Window' (L403, T360, R1671, B1320)
| | | | | [u'Input Capture Window', u'Input Capture WindowPane', 'Pane5']
| | | | | child_window(title="Input Capture Window", control_type="Pane")
I would like to know on how to use sendkeys and mouse move to click "OK" for the above scenario in both cases.