Can I use DOM elements detected through browser as locators

Hi guys.

I have a question about locators usage. I have started using Appium recently and at the moment struggling with some of its concepts that are somewhat different from the Selenium WebDriver which I am more familiar with…

So to start with, as far as I understand, I must use the supplied tools: Inspector(iOS) or Automator(Android) to get the app elements. That is the first problem as it provides a very limited information about the elements. And specifically the structure. For example, the application that I am testing right now is a hybrid application that shows a long list of certain items. Each one of these items has certain elements like buttons, fields, etc… With Inspector I only get the list of all the elements as a long list with now structure to help to identify what elements belong to each items. In the original WebDriver I would have created a WebElement variable and the looked inside it for child elements. It is impossible in Inspector.

What I thought might have solved the issue is using the Safari develop view(or Chrome in case of Andorid) to identify the elements. That provides much more familiar results where it looks like a web page and has some structure. I am not sure however whether I can use these elements or can I only use the elements that were located with the Inspector? If I could work with the elements available through the browser that would’ve solved many problems but I am not sure that’s possible.

So that’s basically the summary of mys questions:

  1. Can I use browser to find the elements
  2. What is the best practice approach in locating elements

Thanks in advance!