title: xPath for listing element in android (using appium automation)
body: <p>I have a scrollable listing (search results) in Android App and for Appium autonation, I need to select a particular element from it. Appium inspector is providing information like index, resource-id and xpath.</p>
  
  <pre><code>content-desc:
  type: android.widget.TextView
  text: AMI
  index: 0
  enabled: true
  location: {60, 513}
  size: {81, 61}
  checkable: false
  checked: false
  focusable: false
  clickable: false
  long-clickable: false
  package: com.abc.xyz.debug
  password: false
  resource-id: com.abc.xyz.debug:id/student_label_text
  scrollable: false
  selected: false
  </code></pre>
  
  <p>xPath for first result (provided by appium inspector) is like this:</p>
  
  <blockquote>
    <p>//android.support.v7.widget.RecyclerView[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.TextView[1]</p>
  </blockquote>
  
  <p>for second result it is..</p>
  
  <blockquote>
    <p>//android.support.v7.widget.RecyclerView[1]/android.widget.FrameLayout[2]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.TextView[1]</p>
  </blockquote>
  
  <p>Above xPaths work but I am looking for shorter version. I tried various combinations but since I am new to this so not able to figure out the solution. Any help on this or any tools which can do this job?</p>