appium启动报错

启动appium时报错java: 无法访问org.openqa.selenium.Rotatable
找不到org.openqa.selenium.Rotatable的类文件
请问这种该怎么解决,网上实在找不到解决方法
image

  • pom依赖
<dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.9.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>8.0.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
  • 代码
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.AndroidMobileCapabilityType;
import io.appium.java_client.remote.MobileCapabilityType;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;

import java.net.MalformedURLException;
import java.net.URL;



public class Demo1Test {
    public static AndroidDriver driver;
    @BeforeAll
    public static void setUp() throws MalformedURLException {
        DesiredCapabilities d = new DesiredCapabilities();
        d.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
        d.setCapability(MobileCapabilityType.PLATFORM_VERSION, "6.0.1");
        d.setCapability(MobileCapabilityType.DEVICE_NAME, "127.0.0.1:7555");
        d.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "io.appium.android.apis");
        d.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, ".ApiDemos");
        d.setCapability(MobileCapabilityType.NO_RESET, true);
        URL remoteUrl = new URL("http://127.0.0.1:4723/wd/hub");
        driver = new AndroidDriver(remoteUrl, d);
    }
    @AfterAll
    public static void tearDown() {
        driver.quit();
    }

    @Test
    void test(){
    }
}

把appium版本换成8.1.1

关闭