Hey guys after updating to java client 4.0.0 and Appium version 1.5.2 this no longer works.
JavascriptExecutor js = (JavascriptExecutor) this.getIOSDriver();
HashMap<String, String> scrollObject = new HashMap<String, String>();
scrollObject.put("direction", "up");
scrollObject.put("element", ((RemoteWebElement) element).getId());
js.executeScript("mobile: scroll", scrollObject);
I get a error as the following on the execute step.
org.openqa.selenium.WebDriverException: Unexpected error in -[UIATableCell_0x7fa0d2b4ec10 scrollUp], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIAutomation_Sim/UIAutomation-449.2/Framework/UIAElement.m line 1473, kAXErrorSuccess (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 941 milliseconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'MacBook-Pro-3.local', ip: '10.93.90.89', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.4', java.version: '1.8.0_60'
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{app=/Users/tempautomation/Desktop/emulatedappfile/sapporo.ipa, networkConnectionEnabled=false, noReset=true, bundleId=com.temp.sapporo3, keepKeyChains=false, databaseEnabled=false, deviceName=iPhone 6, launchTimeout=150000, fullReset=false, platform=MAC, desired={app=/Users/tempautomation/Desktop/emulatedappfile/sapporo.ipa, noReset=true, newCommandTimeout=120, platformVersion=9.3, bundleId=com.zaid.com, browserName=, waitForAppScript=true;, keepKeyChains=false, platformName=iOS, deviceName=iPhone 6, launchTimeout=150000, fullReset=false}, newCommandTimeout=120, platformVersion=9.3, webStorageEnabled=false, locationContextEnabled=false, browserName=, takesScreenshot=true, waitForAppScript=true;, javascriptEnabled=true, platformName=iOS}]
Session ID: f8e3e73b-5fc4-4063-ab03-302df16d007c