Search code examples
javawebviewappium

How to scroll vertically in appium for hybrid app using java


I am automating a hybrid app and I want scroll vertically from top to bottom in a page which is in web view. I am using java client-5.0.4 and appium version is v1.7.2

enter image description here


Solution

  • You can swipe in an app with appium using the press method. E.g. :

    TouchAction().press(el0).moveTo(el1).release()
    

    It also works with coordinates if you wish to use that instead of webelements.

    More information on touch actions can be found here : https://appium.io/docs/en/writing-running-appium/touch-actions/