我在 iOS 的 Appium 上的 Eclipse 项目中运行时遇到问题。自从我开始在新的 Mac 上进行设置以来,iOS 一直是一个令人头疼的问题,并且一直给我带来问题。几个星期以来,我什至无法让它在检查器中工作。之前我只需要使用我的苹果开发者证书,但现在这似乎还不够。
通过在 Xcode 中转到产品 > 测试以在手机上手动安装 WebDriverAgentRunner,我终于能够让 appium 检查器与 iOS 连接。但是当我尝试从我的 Eclipse 项目运行时它失败了。我知道这不是我的项目的问题,因为当我的同事从他们的计算机上运行它时它工作正常。
这是我从 eclipse 得到的输出:
org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: The desired capabilities must include either an app or a bundleId for iOS
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Powerleys-MacBook-Pro.local', ip: 'fe80:0:0:0:d9:262b:6818:287e%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '12.0.1'
Driver info: driver.version: AppiumDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: The desired capabilities must include either an app or a bundleId for iOS
at getResponseForW3CError (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Powerleys-MacBook-Pro.local', ip: 'fe80:0:0:0:d9:262b:6818:287e%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '12.0.1'
Driver info: driver.version: AppiumDriver
这是我的能力,删除了一些值:
"deviceName": "iPhone",
"udid": <removed>
"platformName": "iOS",
"platformVersion": "11.2.6",
"noReset": true,
"bundleId": <removed>
"automationName": "XCUITest",
"showXcodeLog": true,
"xcodeOrgId": <removed>
"xcodeSigningId": "iPhone Developer",
"appActivity": <removed>
这是我的版本号。可能是版本不兼容,但我不知道如何检查。
Appium 1.14.1
Xcode Version 10.1 (10B61)
Mac High Sierra 10.13.6