java.lang.ClassCastException: io.appium.java_client.ios.IOSDriver cannot be cast to org.openqa.selenium.interactions.HasTouchScreen

Scenario : Cut & Copy

  • Long press text area and select all text in inside text area
  • Press Cut button

Environment:

Appium - 1.10.0 version(Desktop)
Java-Client - 6.1.0
iOS - 12.1.4
Device - iPad Pro

Code Snippet:

TouchActions touchAction = new TouchActions(driver);

touchAction.longPress(driver.findElement(locator));

touchAction.perform();