How to Scroll the device using Appium

i couldn’t scroll the mobile device using Appium.
i am getting the error message like --The method Scroll is undefined type of Android Driver.

Please solve my issues.

Please post you code too.

Anyways, if you are using ScrollTo() to ScrollToExact(), then these methods has been deprecated.

if ScrollTo() is deprecated that how do scroll the page in mobile devices using appium . please give the sample code for scroll the page.

What I have implemented is, count the height of the screen and use swipe to find the Element.

public void scrollTo(AndroidDriver androidDriver, String scrollToElement) {
		Dimension dimensions = androidDriver.manage().window().getSize();
		Double screenHeightStart = dimensions.getHeight() * 0.5;
		int scrollStart = screenHeightStart.intValue();
		Double screenHeightEnd = dimensions.getHeight() * 0.2;
		int scrollEnd = screenHeightEnd.intValue();

You can use
TouchAction ta=new TouchAction();,y).perform();
“don’t Forget perform”
Explore touch action method you will find many more methods