0
的尝试运行我的测试后,我总是得到:org.openqa.selenium.SessionNotCreatedException:所需能力的错误
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{platformVersion=6.0, platformName=Android, deviceName=Xiomi}], required capabilities = Capabilities [{}]
Java的客户端5.0.0测试版9
Appium 1.6.5
硒独立3.4.0
使用过Android Studio
public class MyTest1 {
AppiumDriver driver;
@Before
public void setUp() throws Exception {
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Xiomi");
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "6.0");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
driver = new AppiumDriver(url, desiredCapabilities);
}
@After
public void tearDown() throws Exception {
driver.quit();
}
@Test
public void Test(){
}
}
请帮忙!我不明白我在做什么错