1Actions action = new Actions(driver);2WebElement drag = driver.findElement(By.id("draggable"));3WebElement drop = driver.findElement(By.id("droppable"));4action.dragAndDrop(drag, drop).build().perform();5action.dragAndDropBy(drag, 100, 100).build().perform();6action.dragAndDropBy(drag, 100, 0).build().perform();7action.dragAndDropBy(drag, 0, 100).build().perform();8action.dragAndDropBy(drag, 100, 0).build().perform();9action.dragAndDropBy(drag, 0, 100).build().perform();10action.dragAndDropBy(drag, 100, 0).build().perform();11action.dragAndDropBy(drag, 0, 100).build().perform();12action.dragAndDropBy(drag, 100, 0).build().perform();13action.dragAndDropBy(drag, 0, 100).build().perform();14action.dragAndDropBy(drag, 100, 0).build().perform();15action.dragAndDropBy(drag, 0, 100).build().perform();16action.dragAndDropBy(drag, 100, 0).build().perform();17action.dragAndDropBy(drag, 0, 100).build().perform();18import java.io.File;19import java.io.IOException;20import java.net.MalformedURLException;21import java.net.URL;22import java.time.Duration;23import java.util.concurrent.TimeUnit;24import org.openqa.selenium.By;25import org.openqa.selenium.Dimension;26import org.openqa.selenium.OutputType;27import org.openqa.selenium.Point;28import org.openqa.selenium.Rectangle;29import org.openqa.selenium.TakesScreenshot;30import org.openqa.selenium.WebDriver;31import org.openqa.selenium.WebElement;32import org.openqa.selenium.interactions.Action;33import org.openqa.selenium.interactions.Actions;34import org.openqa.selenium.interactions.MoveTargetOutOfBoundsException;35import org.openqa.selenium.interactions.PointerInput;36import org.openqa.selenium.interactions.PointerInput.Kind;37import org.openqa.selenium.interactions.PointerInput.Origin;38import org.openqa.selenium.interactions.Sequence;39import org.openqa.selenium.interactions.TouchActions;40import org.openqa.selenium.interactions.internal.Coordinates;41import org.openqa.selenium.interactions.internal.Locatable;42import org.openqa.selenium.remote.DesiredCapabilities;43import org.openqa.selenium.support.ui.ExpectedConditions;44import org.openqa.selenium.support.ui.WebDriverWait;45import io.appium.java_client.AppiumDriver;46import io.appium.java_client.MobileElement;47import io.appium.java_client.TouchAction;48import io.appium.java_client.android.AndroidDriver;49import io.appium.java_client.android.AndroidKeyCode;50import io.appium.java_client.ios.IOSDriver;51import io.appium.java_client.ios.IOSElement;52import io.appium.java_client.remote.MobileCapabilityType;53import io.appium.java_client.service.local.AppiumDriverLocalService;54import io.appium.java_client.service.local.AppiumServiceBuilder;55import io.appium.java_client.service.local.flags.GeneralServerFlag;56import org.apache.commons.io.FileUtils;57public class AppiumTest {58 public static AppiumDriver<MobileElement> driver;59 public static void main(String[] args) throws MalformedURLException, InterruptedException, IOException {60 DesiredCapabilities cap = new DesiredCapabilities();61 cap.setCapability(MobileCapability