//初始化
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
}
@Test
public void addContact(){
WebElement el = driver.findElement(By.name("App to the happy life of the client"));
el.click();
List<WebElement> buttonList = driver.findElementsByClassName("button");
buttonList.get(0).sendKeys("我的");
buttonList.get(1).sendKeys("设置");
buttonList.get(2).sendKeys("修改密码");
List<WebElement> textFieldsList = driver.findElementsByClassName("textfield");
textFieldsList.get(0).sendKeys("558942");
textFieldsList.get(1).sendKeys("196532");
textFieldsList.get(2).sendKeys("196532");
driver.findElementByName("Save").click();
}
@After
public void tearDown() throws Exception {
driver.quit();
}
}