To drag and Drop Element in Appium
WebElement ele1 = driver.findElementById("rec_card_image");
WebElement ele2 = driver.findElementById("revised_pass");
//Perform drag and drop operation using TouchAction class.
//Created object of TouchAction class.
TouchAction action = new TouchAction(driver);
System.out.println("It Is dragging element.");
action.longPress(ele1).moveTo(ele2).release().perform();
System.out.println("Element has been droped at destination successfully.");
WebElement ele1 = driver.findElementById("rec_card_image");
WebElement ele2 = driver.findElementById("revised_pass");
//Perform drag and drop operation using TouchAction class.
//Created object of TouchAction class.
TouchAction action = new TouchAction(driver);
System.out.println("It Is dragging element.");
action.longPress(ele1).moveTo(ele2).release().perform();
System.out.println("Element has been droped at destination successfully.");
No comments:
Post a Comment