How to use touch action in new java client 6.0.0-BETA4


Why do you have this capability:
dc.setCapability(“BROWSER_NAME”, “android”);?
deviceName, platformName, platformVersion would be suitable.
And try to use my example provided above


im taking the same prob, using AndroidDriver or RemoteWebDriver, i cant use TouchAction…


I see method

tap(WebElement el) has been removed from Appium Java Client 6.x onwards.

Are you aware of any specific reasons ? Certainly this method is more useful and readable than newer methods using TapOptions and PointOptions. :thinking:


Could you please share us, LongPress on coordinates with duration? I have tried but I can’t. What I have tried

//LongPress on coordinates with duration:
new TouchAction((AndroidDriver)driver).longPress(longPressOptions().withElement((ElementOption) point(xPoint, yPoint)).withDuration(Duration.ofMillis(duration))).release().perform();


I searched for every fck place on the internet and 3 days looking I find your code !! thx man !!! help me a lot