ScrollTo not working on Appium for Android
<p>I'm new to appium and trying to write some test scripts in Java for my android app. On this view I have a scrollview with elements inside it. I haven't been able to use the javascript command "scrollTo" on the scrollview or TouchAction. I'm using version 1.4.13 of appium and android 5.0.1. Below is snippets of my code.</p>

<pre><code>final WebElement scroller = (new WebDriverWait (driver, 10).until(ExpectedConditions.presenceOfElementLocated(By.id("vehicleDetailScroll"))));

JavascriptExecutor js = (JavascriptExecutor) driver; 
HashMap &lt;String, String&gt; scrollObject = new HashMap &lt;String, String&gt;();
scrollObject.put("direction", "down");
scrollObject.put("element", ((RemoteWebElement) 
driver.findElement(By.id("vehicleDetailScroll"))).getId());
js.executeScript("mobile: scroll", scrollObject);
</code></pre>

<p>Error logged: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.</p>

<p>Stack-trace for javaScript Executor</p>

<pre><code>info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/db708eaa-13cc-d47d-8a85-d465e21d9d2e/element","method":"POST","json":{"using":"id","value":"vehicleDetailScroll"}}
info: [debug] Proxied response received with status 200: {"sessionId":"db708eaa-13cc-d47d-8a85-d465e21d9d2e","status":0,"value":{"ELEMENT":"fb5d8d8b-8cd7-5487-9862-339c9d837a27"}}
info: &lt;-- POST /wd/hub/session/db708eaa-13cc-d47d-8a85-d465e21d9d2e/element 200 42.071 ms - 122 
info: --&gt; POST /wd/hub/session/db708eaa-13cc-d47d-8a85-d465e21d9d2e/execute {"script":"mobile: scrollTo","args":[{"element":"fb5d8d8b-8cd7-5487-9862-339c9d837a27"}]}
info: [debug] Responding to client with error: {"status":9,"value":{"message":"The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource. (Original error: That device doesn't know how to respond to 'mobile: 'scrollTo--it's probably not using Appium's API)","origValue":"That device doesn't know how to respond to 'mobile: 'scrollTo--it's probably not using Appium's API"},"sessionId":"db708eaa-13cc-d47d-8a85-d465e21d9d2e"}
info: &lt;-- POST /wd/hub/session/db708eaa-13cc-d47d-8a85-d465e21d9d2e/execute 500 1.854 ms - 453 
info: --&gt; DELETE /wd/hub/session/db708eaa-13cc-d47d-8a85-d465e21d9d2e {}
info: Shutting down appium session
info: [debug] Stopping selendroid server
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/db708eaa-13cc-d47d-8a85-d465e21d9d2e","method":"DELETE"}
info: [debug] e
</code></pre>

<p>And with TouchAction</p>

<pre><code>TouchAction scrollAction = new TouchAction((MobileDriver)driver);
int startx = driver.findElement(By.id("vehicleDetailScroll")).getLocation().getX();
int starty = driver.findElement(By.id("vehicleDetailScroll")).getSize().getHeight();
int endx = driver.findElement(By.id("map")).getLocation().getX();
int endy = driver.findElement(By.id("map")).getLocation().getY();

scrollAction.press(startx, starty).moveTo(endx, endy).release().perform();

Error:
FAILED: scenarioFour
org.openqa.selenium.UnsupportedCommandException: Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: '***', ip: '***', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.7.0_80'
Session ID: 6b072ce3-d2fc-1768-6fac-98dd3c31848c
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{automationName=selendroid, platform=ANDROID, acceptSslCerts=true, javascriptEnabled=true, browserName=selendroid, networkConnectionEnabled=true, rotatable=true, desired={automationName=Selendroid, deviceName=GT-19505, platformName=Android}, version=0.16.0, platformVersion=21, platformName=android, deviceName=GT-19505, handlesAlerts=true, warnings={}, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:43)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.AppiumDriver.performTouchAction(AppiumDriver.java:316)
at io.appium.java_client.TouchAction.perform(TouchAction.java:318)
at SeleniumTest01.selenium.AndroidBBDTests.scenarioOne(AndroidBBDTests.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:816)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1124)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1215)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
at org.testng.TestNG.run(TestNG.java:1048)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)
</code></pre>

<p>Stack-trace for the TouchAction:</p>

<pre><code>info: --&gt; POST /wd/hub/session/5b3d9e53-fce3-28ce-66e8- 85a8a5812d50/touch/perform {"actions":[{"action":"press","options":{"x":0,"y":75}},{"action":"moveTo","options":{"x":0,"y":6439}},{"action":"release","options":{}}]}
info: [debug] Proxying command to localhost:8080
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/5b3d9e53-fce3-28ce-66e8-85a8a5812d50/touch/perform","method":"POST","json":{"actions":[{"action":"press","options":{"x":0,"y":75}},{"action":"moveTo","options":{"x":0,"y":6439}},{"action":"release","options":{}}]}}
info: [debug] Proxied response received with status 404: undefined
info: &lt;-- POST /wd/hub/session/5b3d9e53-fce3-28ce-66e8-85a8a5812d50/touch/perform 404 7.924 ms - - 
info: --&gt; DELETE /wd/hub/session/5b3d9e53-fce3-28ce-66e8-85a8a5812d50 {}
info: Shutting down appium session
info: [debug] Stopping selendroid server
info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/5b3d9e53-fce3-28ce-66e8-85a8a5812d50","method":"DELETE"}
</code></pre>

<p>I've tried 
     driver.scrollTo("miles away")</p>

<p>and it works but isn't very idle. I'm also using <strong>Selendroid</strong>.</p>