Long Tap on an Element

How to long tap on an element?

touch the element and then release your finger after 500ms (the usual minimum value on most platforms) or more to have the gesture being registered as long tap.

hi… for android
public void LongPressAction(WebElement elem) {
((JavascriptExecutor)driver).executeScript(“mobile: longClickGesture”,
recall this method in your class test ,and pass the path of the element

1 Like