I am able to see Label, title and other information in the accessibility Inspector. I want to create absolute xpaths as I want to automate Macosx application. How can I get the absolute xpath from the information shown on the accessibility Inspector window?I am using : https://github.com/appium/appium-for-mac And it is suggested that we use absolute xpaths.
[Edit] Have edited the question(Accessibility Identifier -> Accessibility Inspector). Sorry about the mistyping and the confusion.
Below are XPath syntax for accessing label. title e.t.c:1.Label://*[@label='']2.Title://*[@title='title']
Thanks! Have a follow up question : This is still not the complete xpath, right?
@Vikas_Kumar Absolute xpath is bad practice to follow, always use relative xpath.
You can refer to recent webinar from Dan Cuellar on this ( Refer to my post in this week ).
If possible just use id or AccessibilityID again covered in same webinar
Yes, but in the example code where they had shown a demo on the calculator app has all its ui elements identified by full xpath. This sample code is under examples folder from the github project mentioned in the question.Another reason is that I have tried giving IDs and Labels but they are not working for me on a particular view. So I was wondering if I could create full xpaths by using Accessibility Inspector.