我不能用AutoIt监视窗口框中的CheckListBox对象(我认为是Delphi)。它在这片区域什么也看不见。我需要从该地区获得项目列表,并可能选择其中一个项目。在
我使用的是python和robotframework。在
我还尝试使用ControlListView:
self.get_autoit().ControlListView("Setup - XXXXX", "Select the XXXX", "[CLASS:TNewCheckListBox; INSTANCE:1]", "GetText")
但它引发了:
^{pr2}$这个错误似乎是pywinauto的问题。在
无论如何,我不能从这个讨厌的对象得到项目列表。在
autoit spy的结果显示在屏幕截图中:
有谁能建议一个好的方法来访问这个不明区域的物品清单吗?在
我能看到里面的东西检查.exe公司名称:
请在评论中看到瓦西里的详细回答。但是总结一下:
在最初的问题中,我试图使用pyautoit从CheckListBox中获取项目列表,但是因为它不起作用。因此,正如Vasily建议的那样,我在UIA模式下使用了pywinauto(另一种自动化工具),以下是对我有用的:
最有用的技巧是在pywinauto中使用
print_control_identifiers()
方法来获取控件的标识符。另外,uia
模式中的inspect.exe
有助于识别对象。在相关问题 更多 >
编程相关推荐