Use flick as a possible workaround. We can click on the screen and scroll the screen, as well as elements. We cannot draw a UIAScrollView, but we can use a UIACollectionView.
JavascriptExecutor js = (JavascriptExecutor) driver; HashMap scrollObject = new HashMap(); scrollObject.put("direction", "down"); js.executeScript("mobile: scroll", scrollObject);
To solve the problem with isDisplayed () is always true, you can try
if(!driver.findElements(By.name(using)).isEmpty()) { ... }
Replace βuseβ with your locator, I also think that this scroll problem should be solved by Appium mobile: it scrolls and your code looks great, you can also try using vertical swipe instead of scrolling.
source share