How to swipe in Webview


I need to swipe to the right and left between these cards in the webview.

I tried swipegestures but didn’t work,

What method should I follow?

thanks for help.

I’ve never even heard of swipegestures. Use TouchActions. Here is a tutorial with full github source:

Hi, I can use appium 2.0 Touchactions not possible,

My bad, here is the document on depreciation, and the list of alternatives:

add page source.
1 you need only for android?
2 you are with Java?

Hi @Aleksei

Actually I need both, IOS,Android

Yes I 'm using java . Thanks for help.

universal use -> How to swipe in a specific area until target element is show?

where scrolling points use needed element to scroll inside

        // start scroll from center of element
        Rectangle rectangle = el.getRect();
        int startX = rectangle.x + (rectangle.width / 2);
        int startY = rectangle.y + (rectangle.height / 2);
        int endY = 0;
        // now here calculate end points depending on direction needed

Thanks for answer, specific to android Is there an easier solution?, because my farm 20 real devices.

I tried this code but didn’t work @Aleksei

    String text = "SMS";
    getDriver().findElement(AppiumBy.androidUIAutomator("new UiScrollable(new UiSelector()).setAsHorizontalList().scrollIntoView("
                    + "new UiSelector().text(\""+text+"\"));"));

Thanks your help, my problem is solved this code, but for testing on real devices. I have to calculate coordinates for each device. Is there a stable solution? @Aleksei >

PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger
Sequence tapSeq = new Sequence(finger, 1);
PointerInput.Origin.viewport(), 979, 916));
PointerInput.Origin.viewport(), 242, 913));

Yes. Need page source

Thanks @Aleksei

this is HTML. not result of


this code means take FIRST scrollView which can be wrong. see also Appium cannot scroll when there is a tab with 'selected' attribute 'true' - #4 by Aleksei