【发布时间】:2015-10-19 11:49:37
【问题描述】:
对于专家来说,这可能是一个简单的问题。我是 appium 的初学者,这些天我一直在尝试制作我的测试脚本以在我的脚本中打印页面标题。这是下面我的代码的一部分:我无法打印页面标题然后进行验证。有人可以帮忙吗?
driver = new AndroidDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
System.out.println(driver.getRemoteAddress());
}
public void ApkPushValidation() throws Exception {
Assert.assertEquals("Verify your phone number", driver.findElementByName("Verify your phone number").getText());
driver.wait(5000);
String i = driver.getTitle();
System.out.println(i);
if (driver.getTitle().equals("Verify your phone number") ) {
System.out.println("app installation is passed");
} else {
System.out.println("App installation is failed");
}
//System.out.println(i);---> my expectation is that this will print out Verify your Phone number. However this is not printing the page title.
【问题讨论】:
标签: android appium mobile-application