????Appium????????????????????????????iOS??Android?????????????????????????????????????????????????????Appium?????????????Selenium??client?????????????????????????Python??Ruby??Node.js??Objective??java???
?????????????????????????junit java example tests???????iOS sample apps??????????????????TestNG example Tests??
??????????????????????????????Appium?????????https://github.com/appium/appium?????????????????????Appium??????
?????????????????й???sample projects??
grunt buildApp:TestApp
grunt buildApp:UICatalog
???????sample projects??????????????????????????Appium??
grunt appium
???????????????sample-code/examples/java/junit?????в???
mvn test
?????????е????????
mvn -Dtest=com.saucelabs.appium.SimpleTest test
????Java Appium??????Selenium Test?????????????????????RemoteWebDriver????????DesiredCapabilities????????£?
@Before
public void setUp() throws Exception {
    // set up appium against a local application
    File appDir = new File(System.getProperty("user.dir")?? "../../../apps/TestApp/build/Release-iphonesimulator");
 
    File app = new File(appDir?? "TestApp.app");
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability(CapabilityType.BROWSER_NAME?? "iOS");
    capabilities.setCapability(CapabilityType.VERSION?? "6.0");
    capabilities.setCapability(CapabilityType.PLATFORM?? "Mac");
 
    //tell Appium where the location of the app is
    capabilities.setCapability("app"?? app.getAbsolutePath());
 
    //create a RemoteWebDriver?? the default port for Appium is 4723
    driver = new RemoteWebDriver(new URL(http://127.0.0.1:4723/wd/hub)?? capabilities);
}
???????????????????????????selenium?????????????????
@Test
public void example() throws Exception {
 
    // find an element by tag name
    WebElement button = driver.findElement(By.tagName("button"));
    button.click();
 
    // get the value of the element
    WebElement texts = driver.findElement(By.tagName("staticText"));
    assertEquals(texts.getText()?? "some expected value");
}