DrPatience
DrPatience

Reputation: 1776

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

Since updating my device and xCode to iOS 10 and Xcode 8, I have been unable to successfully setup Appium testing on a real device. However, I works fine on the simulator. Below is my setup of capabilities:

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'm faced with the error below:

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

Appium Log via link https://gist.github.com/dodigital/ee5944f31b34749edf3d1c57146594e7

Upvotes: 2

Views: 2330

Answers (2)

SaiPawan
SaiPawan

Reputation: 1194

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

This is the error you are getting you are giving wrong udid. you are missing 'b' in the end

Upvotes: 1

DrPatience
DrPatience

Reputation: 1776

I was finally able to resolve the issues and run on a real device with the following steps:

  • I had omitted the last character in the UDID, added 'b' as suggested above.
  • Added the xcodeConfigFile and realDeviceLogger to the list of capabilities.
  • Ensured the correct development teams where set up on the WebDriverAgent.

Anyone having issues, please feel free to write underneath this post. I spent two good days figuring things out the hard way.

Upvotes: 0

Related Questions