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()

 

posted on 2018-03-09 14:15  小白闯天下  阅读(155)  评论(0编辑  收藏  举报