Drag and Drop Element in Appium - Bug Reaper

                  Bug Reaper

Lean about Automation Testing,Selenium WebDriver,RestAssured,Appium,Jenkins,JAVA,API Automation,TestNG,Maven, Rest API, SOAP API,Linux,Maven,Security Testing,Interview Questions

Tuesday, 6 February 2018

Drag and Drop Element in Appium

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.");

No comments:

Post a Comment