from pywinauto.application import Application import win32gui handle = win32gui.FindWindow("#32770",u"文件上传") app = Application().connect(handle=handle) ab = app.window(title=u"文件上传") #print (ab.PrintControlIdentifiers()) ab['ComboBoxEx32'].TypeKeys(r"D:\Download\tersd.jpg") ab[u'打开(&O)'].click()