title: How to scroll page by using TouchActions appium method?
body: <p>I wrie automated tests for Android native application and forced with scroll problem.</p>
  
  <p>I need to scroll Android application page, and googled next method for this : <a href="http://appium.io/docs/en/commands/interactions/touch/scroll/" rel="nofollow noreferrer">http://appium.io/docs/en/commands/interactions/touch/scroll/</a></p>
  
  <pre><code>TouchActions action = new TouchActions(driver);
  action.scroll(element, 10, 100);
  action.perform();
  </code></pre>
  
  <p>But in first line I’m getting an exception " java.lang.ClassCastException: io.appium.java_client.android.AndroidDriver cannot be cast to org.openqa.selenium.interactions.HasTouchScreen"</p>
  
  <p>My environment is: java, jdk 1.8.0_65, appium 1.6.1</p>
  
  <p>P.S. I tried use TouchAction - from these <a href="http://appium.io/docs/en/writing-running-appium/touch-actions/" rel="nofollow noreferrer">Automating mobile gestures</a>, it works, but methods are deprecated.</p>
  
  <pre><code>.press(100,100) 
  .moveTo(100,100)
  </code></pre>
  
  <p>P.P.S. I also tried to execute adb command, smth like this:</p>
  
  <pre><code>  "adb -s shell input touchscreen swipe " + startx + " " + starty + " " + endx + " " + endy + " " + duration"
  </code></pre>
  
  <p>but it also doesn't work for me and I want to use native appium methodsif it possible of course.</p>