For a hybrid app that has a UI written in HTML, yes it is just ID. The resource ID + name scheme is for native stuff. We almost exclusively use XPath to find elements in my shop because it is flexible and can be used to find elements by any attribute, ID included. I also operate under the assumption that element IDs will change every time the UI loads because that is how a lot of modern day JavaScript frameworks operate…
These days, HTML elements change all the time and a JavaScript framework update that decides to use underscores in the place of dashes all of a sudden can wreck your automation… Dont aim for less maintenance thinking you will do less work; go for easy and painless maintenance that lets you react to changes quickly because its sure to happen at the worst possible time
I should point out that Appium itself doesnt prefer anything in regards to how you select elements… Think of Appium as the thing that connects your automated testing (selenium, testng, etc) and your app. I use Selenium in Java so that is what my few following examples are in:
driver.findElement(By.xpath( “//div[@class=‘x-clear-icon’]”))
driver.findElement(By.xpath("//div[contains(@id,‘ext-foo_text-’)]")) /// Id only has to contain that text not equal it
driver.findElement(By.xpath("//div[text()=’" + User1 + “’]”)) // Inner Text of the div
driver.findElement(By.xpath("//input[@placeholder=‘Select Assignee’]"))