Python-UIAutomation-for-Windows
Python-UIAutomation-for-Windows copied to clipboard
程序跑一段时间,然后win+d显示桌面,此时程序窗口已不显示,但还能继续在桌面上点击
trafficstars
【测试代码】: controlInfo.py class ControlInfo: """automation 控件信息""" home_text = auto.TextControl(Name="主页", AutomationId="lblText") apply_win = auto.PaneControl(AutomationId="Apply") result_text = auto.TextControl(Name="结果") result_day = auto.TabItemControl(Name="当日结果") result_picketage = auto.TabItemControl(Name="定标结果")
点击: from utils.controlInfo import ControlInfo def click2(self): """使用uiautomation 遍历点击控件""" log.info("1、点击主页") ControlInfo.home_text.Click() log.info("2、点击申请") ControlInfo.apply_win.Click() log.info("3、点击结果") ControlInfo.result_text.Click() 【操作步骤】: 程序跑一段时间,然后win+d显示桌面
那位大佬遇到过呀