I am trying to scroll down to the bottom of the screen to a UI block using UiSelector
class but it's not working as expected. Basically, when I run the code it does not scroll all the way to the bottom rather it the first pulls and then starts scrolling but stops in the middle of the screen and then it goes back and forth and fails (attached a screen recording).
Below is the code I used:
myDriver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable("
+ "new UiSelector().description(\"scrollview_train_tab\")).scrollIntoView("
+ "new UiSelector().textMatches(\"Games\"));"));
Here, myDriver is an instance of AndroidDriver
.
Please note that the app does not have resourceId so I am using content-desc to identify UI objects.
I have tried with the followings methods in UiSelector
class: text(), textContains(),description(), textMatches()
but no luck. All of these are resulting in the same.
Please check this screen recording
Appium Client/Version: Java/7.3.0
Appium Server: 1.18.0-1 (Desktop version)
Executed on Android Emulator with Android 8
OS: Windows 10
Can anybody help? Thanks in advance.