TouchAction – LongPress in appium

There are situations, where we have to long press on key buttons of screen to trigger an event, to hold the element or type a letter,

to achieve this, LongPress( ) method have different types of arguments –

LongPress(Int x, Int y) – long press on a position on screen

LongPress(WebElement element) – Long press on certain element on screen

for e.g: On contact screen, to dial “+”, we need to long press zero (“0”) to print +


Try to long press on “zero” button to print +


Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *