I can scroll until get the specified text by the following code

        'new UiScrollable(new UiSelector().scrollable(true).instance(0)).getChildByText(new UiSelector().className("android.widget.TextView"), "my_text")').click()

But I want to scroll only the current visible window so that it's not visible. Like left one is visible when I go to the screen. After a full scroll, I want everything from my first screen to become invisible and the next elements to become visible.

My main goal is to count the total number of messages but by elements selector I can get only currently visible items on the screen. So my idea is to count all elements from first screen then full scroll and count elements from the second scroll and add with previous one

enter image description here enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.