Where exactly accessibility identifier be display in xml?as i am very new..how can we find accessibility id using appium inspector

where exactly accessibility identifier be display in xml?as i am very new…how can we find accessibility id using appium inspector

please help some one…

On Android devices, the accessibility ID is the content descriptor field (abbreviated something like “content-desc”). This is the field Appium looks at when you search for something using accessibility IDs.

I haven’t touched iOS in a while, so I don’t remember clearly what the name of the field is on iOS, but it’s called something like “accessibility label”.

I’m using iOS and having issues with Xpath(and I see that many recommended accessibility_ID). I also can not see this field in the inspector using iOS. This is a simple text field in inspector:
name: email address
type: UIATextField
value: Email address
label: email address
enabled: true
visible: false
valid: true
location: {52.5, 122}
size: {280, 26}
xpath: //UIAApplication[1]/UIAWindow[1]/UIATextField[4]/UIATextField[1]

Which of these fields would be the Accessibility_Id…
Thanks,
Kate

I think the “label” field was field mapped to accessibility ID.

I just used the ‘name’ field in the find_element_by_accessibilty_id(“field name”) and this worked just fine. Possibly both the label and name field are used in this case.
Thanks!

It’s fine in this case because your name field has the same value as your label field - note how both of them are set to “email address”.

Can we create a new field (say 'automation_id) during the development of code, which can be accessible in the inspector along with the existing attributes (name, type, value, label,…etc.,)

I know this thread is a year old, but I wanted to give details for anyone reading this going forward.

In iOS the accessibility identifier is the test id or automation_id. This value is not shown to the end user and it is also not localized.

The ID is not the label, which the end user does encounter the label and the label is localized.