Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Appium: Android Resource ID: translates to what in their selenium integration?

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?

like image 565
Mike Kirkpatrick Avatar asked Aug 21 '13 16:08

Mike Kirkpatrick


People also ask

What is resource ID in Appium?

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.

How do I find my resource ID in Appium?

Syntax: driver. findElement(By.id(“resource-id Value”));

How do I use ID in Appium?

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.

What is Appium accessibility ID?

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.


1 Answers

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"));
like image 132
Kio Krofovitch Avatar answered Sep 29 '22 10:09

Kio Krofovitch