So for example I have:
wd.findElement.By(name("searchBttn"));
the resource-id in the ui xml screen cap is
com.aut.android:id/searchBttn
and Appium can't find the item. I have tried with ID and Name. Is there something else here i could try is there a direct line for line correlation list somewhere that i am missing?
Appium has a Native element identifier for Android and iOS. resource-id is used as an element identifier for Android and name is used for iOS. Code.
Syntax: driver. findElement(By.id(“resource-id Value”));
You can find the ID of an element using android uiautomatorviewer. just go to your SDK tools folder D:\Android\android-sdk\tools, here you can find uiautomatorviewer.
Accessibility ID. Read a unique identifier for a UI element. For XCUITest it is the element's accessibility-id attribute. For Android it is the element's content-desc attribute.
You can find an Android item in Appium by Resource ID, but you have to specify the entire package name along with the resource id:
wd.findElement.By(id("com.aut.android:id/searchBttn"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With