DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("appium-version", "1.0");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "9.3");
capabilities.setCapability("deviceName", "iPhone 6");
capabilities.setCapability("app", "/Users/Candy/Library/Developer/Xcode/DerivedData/Coding_iOS-ezgpwykncedqxhcsolwfizpdrpia/Build/Products/Debug-iphonesimulator/Coding_iOS.app");
IOSDriver driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIAButton[2]")).click();
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[1]/UIATableView[1]/UIATableCell[1]")).click();
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
//输入用户名
driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[4]/UIAKeyboard[1]/UIAKey[28]")).sendKeys("123456789");
https://testerhome.com/topics/5048
https://testerhome.com/topics/300
https://testerhome.com/topics/4027
https://testerhome.com/topics/242