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 +

longpress

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

 

Content posted is based on learning or working experience, please leave comments if anything needs to be added or updated, discuss your queries on our facebook:qavalidation.com, Thanks!

Leave a Reply

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

%d bloggers like this: