1
 import java.io.File;
 //import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.concurrent.TimeUnit;
 //import org.openqa.selenium.remote.CapabilityType;
 import org.openqa.selenium.remote.DesiredCapabilities;
 import org.openqa.selenium.remote.RemoteWebDriver;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 import io.appium.java_client.ios.IOSDriver;


    public class testone{

    public static IOSDriver driver;

    @BeforeClass
public static void setUpBeforeClass() throws Exception {

        File appDir = new File ("//Users//gangaiahl//Appium//jars//CarsGuideApp//Payload");
        File app = new File (appDir,"Car.app");
DesiredCapabilities capabilities = new DesiredCapabilities();

        capabilities.setCapability("browserName", "");
        capabilities.setCapability("platformName", "iOS");
        capabilities.setCapability("deviceName", "Car_iPhone_6");
        capabilities.setCapability("platformVersion", "9.2.1");
        capabilities.setCapability("device", "iPhone 6");

        //capabilities.setCapability("deviceName", "iPad 2");
        //capabilities.setCapability("platformVersion", "8.4");
        //capabilities.setCapability("device", "iPad");

        capabilities.setCapability("app",app.getAbsolutePath());
        capabilities.setCapability("u_did",  "840384833537f40d011032eaaf20a53705a451ce");
         //capabilities.setCapability("u_did", "5446DE10-D8D1-4346-B8C7-E4C16053FE3A");
//840384833537f40d011032eaaf20a53705a451ce
        capabilities.setCapability("bundle_id", "au.dev.com.onewaytraffic.carsguide");

driver = new IOSDriver (new URL("http://127.0.0.1:4723/wd/hub"),capabilities);

}

@Test
public void test() {
    System.out.println("Hello");
    // fail("Not yet implemented");
}

}

enter image description hereenter image description here

Please see the attached screenshot and error from a screenshot . Can anyone help me? I am using Appium on Mac 10.10.5 version & automating iOS Mobile App

2
  • Please elaborate what have you tried and what configurations you saved. Adding just a image in question does not make any sense.. There are many reasons for which inspector can not open. 1. the device you want to inspect is not opened with this appium session. Commented Apr 28, 2016 at 14:53
  • Please see the attached screen for the settings and the capabilities been defined in the script Commented Apr 29, 2016 at 1:07

1 Answer 1

0

You have to configure the device you will work with(real ios device or ios simulator)

Sign up to request clarification or add additional context in comments.

2 Comments

is my configuration wrong, or wat is the correct one or how to configure them?
I mean you have to check your configuration, is the version you are using for ios simulator exists ? and all that, and you have to launch the inspector only after the launch of simulator may be you click into inspector beore the device is loaded !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.