How to automate pop up window click OK button?

2.3k views Asked by At

How to automate pop up window click button? I combine SWAPY and coding, but can not find necessary coding. I automate Speech Filing System Tools for Speech Research

from pywinauto.application import Application
app = Application().Start(cmd_line=u'"C:\\Program     Files\\SFS\\Program\\sfswin.exe"')
afxab = app[u'sfswin - Unknown1']
afxab.Wait('ready')
afxbfdb = afxab.Unknown1
afxbfdb.Maximize()
toolbarwindow = afxab[u'5']
toolbar_button = toolbarwindow.Button(1)
toolbar_button.Click()
app.OpenDialog.Edit.set_text(ur'C:\Program Files\SFS\six.wav')
app.OpenDialog.Open.click_input()
app.OpenDialog.wait_not('visible')
afxab = app.window_(title_re="Open Audio File")
afxabButton1 = ButtonWrapper(afxab.Button.WrapperObject("OK")).Click
0

There are 0 answers