Is there any code to tap and hold on Appium? i use python , is there any command to support it ?
For double click i used click on element twice, for tap and hold i am not getting any solution
longPress(driver. findElement(pressRecBtn)). waitAction(timeInMs). perform();
Press by using x,y coordinates, and duration (in seconds) Horizontal swipe by using the start and end percentage of the screen and an anchor for the height. Vertical swipe by using the start and end percentage of the screen and an anchor for the width. Swipe one element to another element.
WebDriverWait wait = new WebDriverWait(driver, 10); WebElement element = wait. until(ExpectedConditions. elementToBeClickable(By.id(>someid>))); To wait for the page to load to set the amount of time to wait for a page load to complete before throwing an error.
Need to pass driver
TouchAction action = new TouchAction(driver);
action.longPress(webElement).release().perform();
Yes, you can use TouchAction class to longPress any element. Try this:
TouchAction action = new TouchAction();
action.longPress(webElement).release().perform();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With