????Appium??????????????
???????????? ???????[ 2016/12/7 14:59:31 ] ????????????????? ??????????
????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");
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11