I am using Appium desktop server (v 1.15) along with java-client as 7.3.0 and selenium-server 3.141.59.
In my android emulator, I need to scroll down to view a text and stop the scrolling once the text is found. I tried using the following :
driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector()).scrollIntoView(text(\""+text+"\"));");
driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textMatches(\"" + containedText + "\").instance(0))"));
where driver is AndroidDriver<MobileElement>
The issue I am facing is that the scrolling does not stop even if the text is correctly found.
Please help!