Can't run Appium tests on iOS 10 on real device

Since upgrading my device and xCode to iOS 10 and Xcode 8, I have not been able to successfully set up Appium testing on a real device. However, I am doing great on the simulator. Below is my capability setup:

DesiredCapabilities cap = new DesiredCapabilities();

    File f = new File("/Path/App.ipa");

    cap.setCapability(MobileCapabilityType.APPIUM_VERSION, "1.6.0");
    cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
    cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.1.1");
    cap.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6 (Model MG472B/A)");
    cap.setCapability(MobileCapabilityType.UDID, "20a548dc87a87ecddf7ab3975a4b5f3395ac1a0");
    cap.setCapability(MobileCapabilityType.APP,f.getAbsolutePath());
    cap.setCapability("bundleId", "co.uk.xx");
    cap.setCapability(MobileCapabilityType.AUTOMATION_NAME,"XCUITest");
    cap.setCapability("noReset", "true");

    try {
        driver = new IOSDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"), cap);   
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (Exception e) {
        e.printStackTrace();
    }

      

I ran into the error below:

'An unknown server-side error occurred while processing the command. Initial error: Unknown device or simulator UDID: "xx".

Appium Log at https://gist.github.com/dodigital/ee5944f31b34749edf3d1c57146594e7

+2


source to share


2 answers


Available devices: 20a548dc87a87ecddf7ab3975a4b5f3395ac1a0b [XCUITest]    Error: Unknown device or simulator UDID: '20a548dc87a87ecddf7ab3975a4b5f3395ac1a0' .

      



This is the error you are getting, you are giving the wrong udid. you are missing the "b" at the end

+1


source


Finally, I was able to solve the problems and run the following steps on a real device:

  • I missed the last character in the UDID, added 'b' as suggested above.
  • Added xcodeConfigFile and realDeviceLogger to feature list.
  • Provide correct development teams configured in WebDriverAgent.


If you have problems, please write below this post. I spent two good days sorting out the difficulties.

0


source







All Articles