Anshul Anshul - 9 months ago 100
Ruby Question

Scrolling in android using Appium + Ruby

I am trying to scroll through the android app to find a specific element. Below is the code for scrolling:

def self.swipe_to (programme)
puts 'unable to find ' + programme
return false
return true

The scrolling works fine however, the issue is the app scrolls to the programme but as soon the programme is found, the app scrolls back to the top of the list.
And then an error is thrown saying element could not be found.

Has anybody seen similar kind of issue before? Is there any way to stop scrolling as soon as programme is found? I just want to stop the scrolling back to the top as soon as programme is found. Please help.


Apparently this seems to be working for me:


I need to click on the element to stop scrolling further and then click back to go to the same page.