So I've been trying to scroll down to a Submit button on my Android app(made using Kony Visualiser) but for some reason nothing seems to be working. So far I've tried:
touchPerform, touchAction, findElementbyAndroidUiAutomator, changing longPress to press, adding a wait action, reversing the x and y figures, changing the values and several other suggestions I've seen online.Appium version: v1.8.0
My current JavaScript code works when I am scrolling through other elements (segment) and only doesn't work in this specific situation where I'm trying to scroll down a scrollable flexbox.
Here is a snippet of my current code:
.touchPerform([
{ action: 'longPress', options: { x: 50, y: 1800 }},
{ action: 'moveTo', options: { x: 50, y: 0 }},
{ action: 'release' }
])
Any suggestions would be greatly appreciated!
I sometimes still use driver.swipe even tough it's getting deprecated.
driver.swipe(width, startPoint, width, endPoint, duration);
The better way would be:
TouchAction action = new TouchAction(driver);
action.press(startX, startY).moveTo((endX - startX), (endY-startY)).release().perform();
Reina: Make sure you keep flex-scroll container scroll direction set to vertical/both, layout-type vertical. Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With