Archives for posts tagged ‘automation test’

用Pywinauto控制已经启动的进程

老了,脑子不行了。昨天才知道怎么用Pywinauto控制一个正在运行的进程。 app = Application() app.connect_(title = “程序名”) 然后可用print_control_identifiers()列出所有控件的名字。 app.Information.print_control_identifiers() 像我这里想点击一个窗口里的OK按钮,它给我列的名字是”Button”(????),我就这么点击它。 app.Information.Button.Click()