How do I flick in UITest?

JimBennettJimBennett GBXamarin Team, Insider, University, Developer Group Leader ✭✭✭✭

I have a view in my Android app that slides down, and I can flick up to close it back up again. I'd like to automate a test for this but can't find a flick or swipe up method.

Is there a right way to do it?

Tagged:

Answers

  • tohweitohwei USMember ✭✭

    @JimBennett
    We have a product tour pages (in Carousel). But, instead of looking for swipe. I use SwiprRightToLeft(). It does the job.
    For vertical, I have to use .ScrollDownTo()

  • Glenn.WilsonGlenn.Wilson USXamarin Team Xamurai

    @JimBennett If you are using a current version of Xamarin.UITest you can try using the parameterized Scroll* methods that were added in 1.3.0.

    See: forums.xamarin.com/discussion/62446/xamarin-uitest-1-3-4

    Parameterized Scroll* methods to allow for variable swipe speed/distance and optional inertia when using gestures.

  • JimBennettJimBennett GBXamarin Team, Insider, University, Developer Group Leader ✭✭✭✭

    Thanks @tohwei and @Glenn.Wilson - I've tried playing with the Scroll methods so far with no luck - not sure if it is because we only handle OnFling not OnScroll.

    Will play some more and report back.

Sign In or Register to comment.