Resource id not available for an element

Hi,

The “resource id” is not available for a “button” element in our native application. How to identify the element now? I have a nexus 7 and Android 4.4.4.

Hi Rohansurya,

There are multiple way available to identify element i.e.

  1. You can use class name (if available) ,it will return list of webelement,you can perform action according to index.

  2. Use relative xpath it will work on multiple devices.

  3. Use “name” in android uiautomator “cont-desc” is a name.

I hope it will helps.

Hi dharam1690,

Thanks for the reply. I am new to appium so it would be really helpful if you could guide me in getting the xpath of the element.