appium-flutter-driver
appium-flutter-driver copied to clipboard
[Tag 2.2.2] ScrollUntilVisible don't work well
When i update from 1.17.1 to 2.2.2. My test case worked well in version 1.17.1 but not in 2.2.2. It sometime will not work. Seem it happen when has scrollUntil before it. I guess.
- First case
I scrollUntilVisible to click answer => It work. Then I click to button Next with funtion scrollUntilTapable => It not work and raise timeout. Appium log in here: https://gist.github.com/thuonglai/4c05db4ffd70239b41385378a33491f1
- Second case
I scrollUntilVisible to select year but it scroll till the end of list.
Appium log in here : https://gist.github.com/thuonglai/3482327e66dc2f8e8b435ec7a50764ef
while (!isVisible && shouldRetry(startAt, waitTimeoutMilliseconds)) {
(async () => {
try {
await waitFor(self, item, durationMilliseconds);
isVisible = true;
} catch (ign) {}
})();
try {
await scroll(self, elementBase64, {
dx: dxScroll,
dy: dyScroll,
durationMilliseconds,
frequency
});
} catch { /* go to the next scroll */ }
}
I think waitFor must wait in all waitTimeoutMilliseconds not in durationMilliseconds and retry. May be sometime, waitfor not execute and scroll over this element (in my second testcase). But i don't know why my first testcase happen. Button "Next" always display in 60s and waitFor not return true.
This fix in 2.5.1 works great on iOS simulated devices, but fails on real physical devices hosted on browserstack. Pre 2.5.1 it failed on both real and simulated.
I don't test on IOS. But it is working well on real device Android. Let me check it on IOS.
@AYASGray I test it on real device iOS and it working normal.