To Scroll Vertically in Appium
driver.swipe(100,500,100,100, 3000);// Here start x, start y, end x, end y, time //Revise swipe
TouchAction action1=new TouchAction(driver);//Note it is TouchAction not TouchActions
action1.press(368, 868).waitAction(500).moveTo(368, 260).release().perform();
To Swipe Horizontal in Appium
TouchAction action1=new TouchAction(driver);
action1.press(0, 300).waitAction(500).moveTo(700, 300).release().perform();
Scroll By Text
driver.scrollTo("Brands We Love");// here text should be present in UI Automator for that Element
if that Element contains text use the same text to Scroll.
driver.swipe(100,500,100,100, 3000);// Here start x, start y, end x, end y, time //Revise swipe
TouchAction action1=new TouchAction(driver);//Note it is TouchAction not TouchActions
action1.press(368, 868).waitAction(500).moveTo(368, 260).release().perform();
To Swipe Horizontal in Appium
TouchAction action1=new TouchAction(driver);
action1.press(0, 300).waitAction(500).moveTo(700, 300).release().perform();
Scroll By Text
driver.scrollTo("Brands We Love");// here text should be present in UI Automator for that Element
if that Element contains text use the same text to Scroll.
showing an error that "The method press(int, int) is undefined for the type TouchActions"
ReplyDeletehow to fix ??
driver.swipe() is deprecated
ReplyDelete