Unable to scroll the page in android

Below both cods not work for me

enter code here

JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put(“direction”, “down”);
js.executeScript(“mobile: scroll”, scrollObject);


JavascriptExecutor js = (JavascriptExecutor) driver;
HashMap<String, Double> scrollObject = new HashMap<String, Double>();
scrollObject.put(“startx”, 200.00);
scrollObject.put(“starty”, 200.00);
scrollObject.put(“endx”, 200.00);
scrollObject.put(“endy”, 300.00);
js.executeScript(“mobile: scroll”, scrollObject);

error occure- ERROR running Appium command: string is not a function
Command duration or timeout: 13 milliseconds

I am also seeing the same issue. Please help

Hi i got solution,

Just use swipe option.
driver.swipe(190, 500, 190, 300, 1000);- this code scroll to you down

Did not work @harshal.

Try multiple co-ordinates. For that enable the show touch pointer in developer option in setting.
put proper x-y co-ordinate and also make some tryle and error

Sure @harshal. Will try to do it.