public class IOSWeb {
IOSDriver driver;
DesiredCapabilities cap = new DesiredCapabilities();
@BeforeTest
public void startAppium() throws MalformedURLException, InterruptedException {
cap.setCapability(MobileCapabilityType.BROWSER_NAME, "Safari");
cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.3");
cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "ios");
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6s");
driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), cap);
}
@Test
public void runTest() {
// Your test script goes here
}
@AfterTest(alwaysRun = true)
public void tearDown() {
driver.quit();
}
}