我正在尝试使用抛出此错误的 java 在 Eclipse IDE 中测试我的应用程序。我也启动了 appium 服务器。也给出了匹配的端口号。这是我的日志跟踪。帮帮我。提前致谢
这是我用于使用 appium 测试我的 android 应用程序的代码:
public class MilonowFirstTest {
static AppiumDriver<WebElement> driver;
// @BeforeClass
public static void main(String[] args) throws MalformedURLException
//public void Setup() throws MalformedURLException
{
DesiredCapabilities cap = new DesiredCapabilities();
//cap.setCapability(AndroidMobileCapabilityType.De, value);
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Android emulator");
//cap.setCapability(MobileCapabilityType.APP_PACKAGE, value);
cap.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "com.test.myapp");
//cap.setCapability(MobileCapabilityType.APP, "");
cap.setCapability("avd", "Honor 7X API 27");
cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "23");
cap.setCapability(MobileCapabilityType.AUTOMATION_NAME, "Appium");
driver = new AndroidDriver<WebElement>(new URL("http://127.0.0.1:4723/wb/hub"), cap);
Assert.assertNotNull(driver.getContext());
}
// @Test()
// public void SimpleTest()
// {
// Assert.assertNotNull(driver.getContext());
// }
}
拉风的咖菲猫
相关分类