LongPress method giving error as The method longPressWebElement in the type TouchAction is not applicable for the arguments Long7 | Appium Training|Appium tutorials
30% Mid August Discount Avail now

Appium Training Forum

LongPress method giving error as The method longPressWebElement in the type TouchAction is not applicable for the arguments Long7

S
Swapnil Salunke Post on 09/12/2018

Code snippet TouchAction action=new TouchAction(driver);

for(MobileElement element:allNames){
System.out.println("all Names::"+element.getText());
}

action.longPress(longPressOptions()
.withElement(element(e1))
.withDuration(ofSeconds(5)))
.moveTo(element(e2))
.release().perform();
is giving error on longPress(). I am using latest appium java client 6.1.0.
Please look into it.
PFA screenshot for ref

A

Instructor

aditya Reply on 11/12/2018

This is depricatedmethod..

please follow latest videos for new commands