My situation
I want to write UI-tests for an Android App and therefore I need to scroll in some of the App's fragments. The tests are written in Kotlin, Appium version is v1.15.1 .
My problem
I use the standard approach for scrolling(see below) and it works fine, as long as the coordinates of my starting point don't fall onto a clickable element. I also observed this behaviour when navigating through the App with the Appium Desktop Inspector.
My current approach
PlatformTouchAction(driver as AppiumDriver)
.press(PointOption.point(100, 500))
.waitAction(WaitOptions.waitOptions(Duration.ofMillis(1000)))
.moveTo(PointOption.point(100, 100))
.waitAction(WaitOptions.waitOptions(Duration.ofMillis(1000)))
.release()
.perform()
As mentioned before this works if the starting point (100,500) is not on a clickable element.
If for example a button happens to be at (100,500) the scroll/swipe is not performed, but in fact on scroll listeners are still called.