Automating native app in iOS automation using appium

Here is the simple example to test the app on iPhone simulator. To run scripts on real iOS device, you will need one more capability – ‘UDID’ (Device ID)
package iostests;

import io.appium.java_client.ios.IOSDriver;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;


 * Created by Sagar on 10-07-2016.
public class NativeAppTest {
    IOSDriver driver;
    public void test1() throws Exception{
        DesiredCapabilities caps = new DesiredCapabilities();
        caps.setCapability("platformName", "iOS");
        caps.setCapability("platformVersion", "9.0");
        caps.setCapability("deviceName", "iPhone 6s");
        caps.setCapability("app", "/usr/");
        driver = new IOSDriver(new URL(""), caps);


Web development and Automation testing

solutions delivered!!