Appium in Mac for iOSのトラブルシュート
はじめに
こちらの記事を参考に進めたが、いろいろ嵌ったのでメモ。
環境
環境 | バージョン |
---|---|
macOS | 10.13.6 |
Xcode | 9.4.1 |
Appium | 1.9.0 |
iOS | 11.4 |
UDIDの設定
iTunesのシリアル番号を使うという情報があったけど、自分の環境ではだめだった。
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: '(シリアル番号)'
解決方法
Xcodeを起動して、Window > Devices and Simulators > Identifierの値を設定する。
test runに失敗
~/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent $ xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=$udid' test
(省略)
Testing failed:
Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 11.4'
** TEST FAILED **
The following build commands failed:
Check dependencies
(1 failure)
解決方法
~/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent $ xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=$udid' test
(省略)
Testing failed:
Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 11.4'
** TEST FAILED **
The following build commands failed:
Check dependencies
(1 failure)
1)XcodeからWebDriverAgent.xcodeprj
を開く
2)TargetsからWebDriverAgentRunnerを選択
3)Generalタブ > SigningのAutomatically manage signing
にチェックを入れて、Teamは開発用のAppleIDを選択
4)Build Settingsタブ > Signing > Code Signing Identityは全てiOS Developer
となるように設定
5)Provisioning ProfileはAutomatic
のまま
6)macOSを再起動(これめっちゃ重要)
Appium接続エラー
[Xcode] 2018-09-18 17:52:12.476 xcodebuild[2548:64487] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted, NSUnderlyingError=0x7f8948a03d40 {Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/debug/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f89489303f0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
[Xcode]
[Xcode]
[Xcode] Testing failed:
[Xcode]
[Xcode] Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
[Xcode] Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 11.4'
[Xcode] Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
解決方法
[Xcode] 2018-09-18 17:52:12.476 xcodebuild[2548:64487] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted, NSUnderlyingError=0x7f8948a03d40 {Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/debug/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f89489303f0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}}
[Xcode]
[Xcode]
[Xcode] Testing failed:
[Xcode]
[Xcode] Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor.
[Xcode] Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 11.4'
[Xcode] Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code '65' and signal 'null'
Appiumのdesired capabilityにagentPath
とbootstrapPath
を追加する
desired_capabilities={
'app': 'com.apple.mobileslideshow',
'udid': '$udid',
'platformName': 'iOS',
'platformVersion': '11.4',
'deviceName': 'iPhone 6',
'agentPath': '/Users/debug/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj',
'bootstrapPath': '/Users/debug/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
})
Author And Source
この問題について(Appium in Mac for iOSのトラブルシュート), 我々は、より多くの情報をここで見つけました https://qiita.com/nishitaku/items/3a8f7dea23efe995a109著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .