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);
OR
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