我正在使用uiautomation library用python自动化一个应用程序。En python 3.6.8
当我使用该方法时,我可以毫无问题地访问应用程序的任何元素
control = auto.ControlFromCursor ()
print (control.AutomationId, control.Name)
但是,当我尝试根据元素的属性创建元素时,应用程序会中断
control = auto.Control(AutomationId=id_, Name=name, ClassName=cls_name)
即使我这样做,它也失败了
control = auto.ControlFromCursor ()
print (control.AutomationId, control.Name)
id_ = control.AutomationId
name = control.Name
cls_name = control.ClassName
control = auto.Control(AutomationId=id_, Name=name, ClassName=cls_name)
这是我从微软找到的,但我不知道在哪里可以找到这些修补程序,也不知道该怎么做。有什么想法吗?:/
这就是错误所在
目前没有回答
相关问题 更多 >
编程相关推荐