请教pywinauto点击TreeItem的问题
我在用pywinauto写一个脚本用于操作windows的一个桌面软件。通过print_control_identifiers()打印同当前控件结构,如下。我想用鼠标去点击“人事管理”这个节点。请教一下代码应该如何写?谢谢!TreeView - '' (L0, T72, R160, B1050)
['TreeView']
child_window(auto_id="tvMenus", control_type="Tree")
|
| TreeItem - '人事操作' (L22, T72, R160, B88)
| ['人事操作', '人事操作TreeItem', 'TreeItem', 'TreeItem0', 'TreeItem1']
| child_window(title="人事操作", control_type="TreeItem")
| |
| | TreeItem - '人事管理' (L41, T88, R93, B104)
| | ['人事管理', '人事管理TreeItem', 'TreeItem2']
| | child_window(title="人事管理", control_type="TreeItem")
| |
| | TreeItem - 'SAP接口' (L41, T104, R90, B120)
| | ['SAP接口TreeItem', 'SAP接口', 'TreeItem3']
| | child_window(title="SAP接口", control_type="TreeItem")
|
| TreeItem - '考勤操作' (L22, T120, R160, B136)
| ['TreeItem4', '考勤操作', '考勤操作TreeItem']
| child_window(title="考勤操作", control_type="TreeItem")
| |
| | TreeItem - '考勤管理' (L41, T136, R93, B152)
| | ['考勤管理', '考勤管理TreeItem', 'TreeItem5']
| | child_window(title="考勤管理", control_type="TreeItem")
| |
| | TreeItem - '实施定制' (L41, T152, R93, B168)
| | ['实施定制TreeItem', '实施定制', 'TreeItem6']
| | child_window(title="实施定制", control_type="TreeItem")
| |
| | TreeItem - '多语翻译 ' (L41, T168, R96, B184)
| | ['多语翻译 ', '多语翻译 TreeItem', 'TreeItem7']
| | child_window(title="多语翻译 ", control_type="TreeItem")
|
| TreeItem - '考勤文员' (L22, T184, R160, B200)
| ['考勤文员TreeItem', '考勤文员', 'TreeItem8']
| child_window(title="考勤文员", control_type="TreeItem")
| |
| | TreeItem - '考勤信息查看' (L41, T200, R117, B216)
| | ['TreeItem9', '考勤信息查看TreeItem', '考勤信息查看']
| | child_window(title="考勤信息查看", control_type="TreeItem")