Scrolling on Android

Hello,

I have tried researching this as much as I could as well as tried anything I could think of trying to scroll on an Android device. This is the code I’ve tried:

    #swipe(start_x: 750, start_y: 2420 , end_x: 750, end_y: 1100, duration: 0.5)

    #swipe :start_x => 730, :start_y => 2413, :end_x => 811, :end_y => 653, :touchCount => 1, :duration => 0.5

#execute_script "mobile: scrollTo", :element => find_element(:name, "ELEMENT NAME").ref

#execute_script "mobile: scrollTo", :element => find_element(:xpath, "xpathToTheElement]").ref

#execute_script action.press(750, 2420).waitAction(200).moveTo(750,1100).release().perform()

#Appium::TouchAction.new.tap(:x => 750, :y => 2420, :duration => 0.1).release.perform

#Appium::TouchAction.new.swipe(:start_x => 750, :start_y => 2420, :end_x => 750, :end_y => 1100, :duration => 0.1).release.perform

scrollObject = {}
element = find_element(:class, "android.widget.ListView")
scrollObject["element"] = element.ref
scrollObject["text"] = "ELEMENT NAME"
execute_script "mobile: scrollTo", scrollObject

Is there anything else I can try? Im really just out of ideas by now…

It looks like you are trying to swipe from the bottom of the screen to approximately 75% of the way up and it’s not working for you. How did you derive the value start_y? If you obtained the dimensions of the device, you may need to subtract 1 from start_y.

Does appium record any problems in the appium server log?