vendredi 25 novembre 2016

Android UIautomator swiping ViewAnimator

I'm testing my app but have a problem with the DatePicker. All I need is to swipe up until another month appears (searching for a specific date).

Screenshot

The structure is a bit tricky though since there is a ViewAnimator (The calendar) showing a ListView (one month). So I can't scroll down this list view since it only contains one month. Instead I need to swipe up the viewAnimator. The problem is, I can't find any method for scrolling until a specific position like with ListViews.

Structure

Is there a method like

listView.scrollTextIntoView("November 2018");

The only half working solution I found was

swipe(Direction.UP, 0.1f);

which is basically just doing a (kinetic) swipe. So I can't really estimate how often I have to do that until I reach "November 2018" for instance. Any ideas?

Aucun commentaire:

Enregistrer un commentaire