如何在桌面应用程序中找到元素的 XPath
我正在使用检查工具来获取元素的名称。如何从 Inspect 工具创建 Xpath?我可以在 XPath 中使用 LegacyIAccessible.ChildId 来定位元素的位置吗?
'How found: Mouse move (-1648,104)'
'Name: "Compare"'
'ControlType: UIA_ButtonControlTypeId (0xC350)'
'LocalizedControlType: "button"'
'BoundingRectangle: {l:-1695 t:94 r:-1587 b:116}'
'IsEnabled: true'
'IsOffscreen: false'
'IsKeyboardFocusable: true'
HasKeyboardFocus: false
'AccessKey: "Alt, C, CP"'
'ProcessId: 22040'
'IsPassword: false'
'HelpText: ""'
'IsDialog: false
'LegacyIAccessible.ChildId: 3'
'LegacyIAccessible.DefaultAction: "Press"'
'LegacyIAccessible.Description: "Compare the Controller Strategy with the PC"'