How can I locate XPath for an element in desktop application
I am using Inspect tool to get the Name of an element. How do I create an Xpath from the Inspect tool? Can I use LegacyIAccessible.ChildId in the XPath to locate the location of the element.
'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"'