Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add accessibility identifier to ios (cordova/webview) in html

I am doing mobile ios webview app automation using appium.

I am unable to see the id attributes by using appium inspector.some says need to add accessibility id attribute so that appium can inspect that element.

But we know how to add accessibility id for native app's, but please suggest how to add accessibility for webview app(cordova) in html code.

Thanks in advance.

like image 890
Durga Prasad Avatar asked Oct 12 '15 12:10

Durga Prasad


1 Answers

Don't know why, but after spending half a day to explore on appium, I found that if you put these two attribute to the element, it can show the accessibility id on apium

<div aria-label="<your_accessibility_id>" role="<your_accessibility_id>">
</div>
like image 174
james Avatar answered Sep 20 '22 08:09

james