Mobile Android TAB - object finding error

Katalon 6.1.0
Appium 1.8.?

I use in my app TABs
start mobile spy and get Object
//hierarchy/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.support.v4.widget.DrawerLayout[1]/android.view.ViewGroup[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.HorizontalScrollView[1]/android.widget.LinearLayout[1]/android.support.v7.app.ActionBar$Tab[1]/android.widget.TextView[1]

when i start test and trying to find this object - I get an error

when i tried to find an object by xpath with ID
//android.widget.LinearLayout[@resource-id=‘pat:id/appbar_below_toolbar’]/android.widget.HorizontalScrollView[1]/android.widget.LinearLayout[1]/android.support.v7.app.ActionBar$Tab[1]/android.widget.TextView[1]
i got the same error.

When i tried to run MObile Recoder - when trying to do TAP on element TAB I get an error

How can I identify (find) the object so that later it can be used in tests

I solved this problem so :

  1. //android.widget.TextView[@text=‘Day’]
  2. //*[@class = ‘android.support.v7.app.ActionBar$Tab’][1]/android.widget.TextView[1]

are there any other solutions ???

Hi @remix4you,

I think your first solution, //android.widget.TextView[@text=‘Day’] is a good one - it’s short, to the point, and doesn’t have a lot of unnecessary and brittle xpath components.

– Chris

Hello everyone,

This bug is fixed in version 7.6.5, a pre-release, which is available here. For more details regarding this version, you can find in Release notes version 7.6.5.

Happy Testing
Jass