无法使用appium 1.6.0在IOS 10真实设备中启动ipa文件

首先,我从开发团队获得一个.ipa文件进行testing,开发人员提到了带有设备UDID的.ipa文件,以便我可以将它安装在我的iPhone上。

[Appium] Welcome to Appium v1.6.0 [Appium] Appium REST http interface listener started on 0.0.0.0:4723 [HTTP] --> POST /wd/hub/session {"capabilities":{"desiredCapabilities":{"app":"/Users/apple/Downloads/ReaderManager.ipa","noReset":true,"platformVersion":"10.0","bundleId":"com.hidglobal.pacs.se.readermanager","platformName":"iOS","udid":"1f51471daf2a4674f11ece1a19d6cb4fa5569c02","deviceName":"iPhone 6"},"requiredCapabilities":{}},"desiredCapabilities":{"app":"/Users/apple/Downloads/ReaderManager.ipa","noReset":true,"platformVersion":"10.0","bundleId":"com.hidglobal.pacs.se.readermanager","platformName":"iOS","udid":"1f51471daf2a4674f11ece1a19d6cb4fa5569c02","deviceName":"iPhone 6"},"requiredCapabilities":{}} [debug] [MJSONWP] Bad parameters: BadParametersError: Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","sessionId","id"]} and you sent ["capabilities","desiredCapabilities","requiredCapabilities"] [HTTP] <-- POST /wd/hub/session 400 6 ms - 201 [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/apple/Downloads/ReaderManager.ipa","noReset":true,"platformVersion":"10.0","bundleId":"com.hidglobal.pacs.se.readermanager","platformName":"iOS","udid":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","deviceName":"iPhone 6"},"requiredCapabilities":{}} [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/apple/Downl... [Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up. [Appium] Creating new XCUITestDriver session [Appium] Capabilities: [Appium] app: '/Users/apple/Downloads/xyz.ipa' [Appium] noReset: true [Appium] platformVersion: '10.0' [Appium] bundleId: 'xxxxxxxx'(Changed Manually) [Appium] platformName: 'iOS' [Appium] udid: 'xxxxxxxxxxxxxxxxxxxxx'(Changed Manually) [Appium] deviceName: 'iPhone 6' [debug] [XCUITest] XCUITestDriver version: 2.0.26 [BaseDriver] Session created with session id: f1a2a222-8e4f-47fb-bbbd-2429f159b403 [debug] [XCUITest] Xcode version set to '8.0' [debug] [XCUITest] iOS SDK Version set to '10.0' [debug] [XCUITest] Available devices: xxxxxxxxxxxxxx [debug] [XCUITest] Creating iDevice object with udid xxxxxxxxxxxxxxxxxxx [XCUITest] Determining device to run tests on: udid: 'xxxxxxxxxxxxxxxxx', real device: true [BaseDriver] Using local app '/Users/apple/Downloads/ReaderManager.ipa' [debug] [BaseDriver] Copying local zip to tmp dir [debug] [BaseDriver] Unzipping /var/folders/2d/qg1847_14nd90zgq9_m30zhc0000gn/T/2016926-3576-bfkmhz.8l1yycik9/appium-app.zip [debug] [BaseDriver] Testing zip archive: /var/folders/2d/qg1847_14nd90zgq9_m30zhc0000gn/T/2016926-3576-bfkmhz.8l1yycik9/appium-app.zip [BaseDriver] Unzipped local app to '/var/folders/2d/qg1847_14nd90zgq9_m30zhc0000gn/T/2016926-3576-bfkmhz.8l1yycik9/Payload/ReaderManager.app' [debug] [XCUITest] Checking whether app is actually present [debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog [debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog' [XCUITest] Setting up real device [debug] [XCUITest] Stdout from app isInstalled check: [....] Waiting for iOS device to be connected [....] Using iPhone 6 (GSM) 'Iphone 6' (xxxxxxxxxxxxxxx). true [debug] [XCUITest] App is installed. [debug] [XCUITest] Full reset not requested. No need to install. [XCUITest] Using default agent: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj [XCUITest] Using default bootstrap: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent [XCUITest] Launching WebDriverAgent on the device [debug] [XCUITest] Carthage found: /usr/local/bin/carthage [debug] [XCUITest] Beginning test with command '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/bin/run-xcodebuild.sh --project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj --scheme WebDriverAgentRunner --destination id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent' [XCUITest] Waiting for WebDriverAgent to start on device [XCUITest] The real device logger 'idevicesyslog' was unable to start log capture. Please try installing 'deviceconsole' ('npm install -g deviceconsole') and specify the path to it using the 'realDeviceLogger' capability. [debug] [XCUITest] Log file for xcodebuild test: /Users/apple/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/5D3AF14D-B012-422A-B281-1F3CE59A49EA/Session-WebDriverAgentRunner-2016-10-26_150854-8VLGgF.log [Xcode] 2016-10-26 15:08:58.437 xcodebuild[3594:21573] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/apple/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/5D3AF14D-B012-422A-B281-1F3CE59A49EA/Session-WebDriverAgentRunner-2016-10-26_150854-8VLGgF.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/apple/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/5D3AF14D-B012-422A-B281-1F3CE59A49EA/Session-WebDriverAgentRunner-2016-10-26_150854-8VLGgF.log} [Xcode] Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.0' [Xcode] Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.enter code here [Xcode] Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.0' 

在执行脚本的过程中,我遇到了上述问题。

要求团队帮助我确定问题以及如何解决问题。

谢谢,古特姆

  1. 在terminal运行下面​​的命令打开WebDriverAgent项目。

     Open usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj 
  2. 现在这将打开xcode中的WebDriverAgent项目。

  3. 按照下面的截图所示去build立项目的设置,并添加开发团队。

在这里输入图像说明

  1. 如果开发团队没有可供select的选项,请按照以下步骤添加帐户。

    一个。 点击xcode并导航到首选项。
    湾 点击帐户。
    C。 点击“+”符号并添加与用于代码签名活动的帐户相同的帐户。

  2. 现在您可以在开发团队中select添加的帐户。

  3. 为开发团队select的帐户应与为代码签名活动select的帐户相同。
  4. 现在,通过导航来构build设置,也可以类似地为所有目标添加开发团队。
  5. 运行代码来检查是否有错误,并显示构build成功的消息。

如果您在创build开发人员团队并在Xcode中构build应用程序后无法执行appium脚本..

按照下面的链接给出的步骤,尝试在这些步骤后运行appium,我试了一下(注意:有一些不可思议的库缺less安装:)并为我工作。 我有Mac OS 10.12.5和Appium版本1.6.5。 希望这是有帮助的。

Appium Setup在真实和仿真设备上运行