How to tap Android TabLayout tab (set up with ViewPager)?

mikeacostamikeacosta USUniversity ✭✭✭

I'm writing a UITest for an APK and trying to tap a tab in a TabLayout. The TabLayout has an id, but the individual TabViews do not, so I'm not sure how to access those. I've tried to access by text but it's now working for me. Thanks for any help.

I'm using a ViewPager to set up the tabs, not sure it that matters.

Answers

  • LuisRodriguez92LuisRodriguez92 USMember ✭✭✭

    tabs.TabSelected += Tabs_TabSelected;
    tabs.GetTabAt(0). ...

    Is that what you were looking for?

  • mikeacostamikeacosta USUniversity ✭✭✭

    Thanks for your reply. I was able to get it to work:
    app.Tap(c => c.Marked("TABTEXT"));

Sign In or Register to comment.