由于xcodebuild失败,无法启动WebDriverAgent:“xcodebuild失败,代码为65”Iphone6 Simulator

问题描述 投票:1回答:2

我正在尝试使用Xcode在iPhone 6模拟器上运行亚马逊应用程序。

该应用程序已安装在iPhone模拟器中,但无法与其元素进行交互。

Appium版本 - 1.7.2 Xcode版本9.2 平台Mac- 10.12.6 下载了应用程序 - 即xxx.app.ipa

日志:

[Xcode] 2018-02-13 21:23:08.009 xcodebuild [9868:75242]错误Domain = IDEFoundationErrorDomain Code = 1“无法启动模拟可执行文件:在/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData找不到文件/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app“UserInfo = {NSLocalizedDescription =无法启动模拟可执行文件:在/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-找不到文件dikkwtrisltbeobjmfvpthwwekvs / Build / Products / Debug-iphonesimulator / WebDriverAgentRunner-Runner.app} [Xcode] 2018-02-13 21:23:08.009 xcodebuild [9868:75242]

错误域= IDETestOperationsObserverErrorDomain代码= 6“早期意外退出,操作从未完成引导 - 不会尝试重启”UserInfo = {NSLocalizedDescription =早期意外退出,操作从未完成引导 - 不会尝试重启} [Xcode] [Xcode] 2018 -02-13 21:23:08.010 xcodebuild [9868:75259]连接对等体拒绝了“dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface”的通道请求;频道已取消

[Xcode] ** TEST EXECUTE FAILED ** [Xcode] [Xcode] 2018-02-13 21:23:08.011 xcodebuild [9868:75318]保存测试日志时出错:

错误域= NSPOSIXErrorDomain代码= 2“没有这样的文件或目录”UserInfo = {NSFilePath = / Applications / Xcode.app / Contents / Developer / Xcode / DerivedData / WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs / Logs / Test / 921A213D-B7E4-4994-9443- F73DDE5FBD4D.xcactivitylog,NSLocalizedDescription =没有这样的文件或目录}用户信息:{[Xcode] NSFilePath =“/ Applications / Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/921A213D-B7E4-4994-9443-F73DDE5FBD4D.xcactivitylog”; [Xcode] NSLocalizedDescription =“没有这样的文件或目录”; [Xcode]} [Xcode]

[XCUITest] xcodebuild退出代码'65'并发出'null'信号[BaseDriver]事件'wdaStartFailed'登录于1518585788035(格林威治标准时间-0800(太平洋标准时间)21:23:08)[XCUITest]由于xcodebuild失败,无法启动WebDriverAgent: “xcodebuild失败,代码为65”。 [XCUITest]退出并卸载WebDriverAgent,然后重试[XCUITest]关闭子进程[XCUITest]从设备中删除WDA应用程序[XCUITest]错误:由于xcodebuild失败,无法启动WebDriverAgent:“xcodebuild失败,代码为65”。在tryCatch(/Applications/Appium.app)的XCUITestDriver.quitAndUninstall $(/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) /Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)在GeneratorFunctionPrototype.invoke上的GeneratorFunctionPrototype.prototype。(匿名函数)作为_invoke在GeneratorFunctionPrototype.invoke(/ Applications / Appium.app / Contents / Resources / app / node_modules / appium / node_modules / babel-runtime / regenerator / runtime.js:136:37)at Error:由于xcodebuild失败而无法启动WebDriverAgent:“xcodebuild失败,代码为65 ”。在tryCatch(/Applications/Appium.app)的XCUITestDriver.quitAndUninstall $(/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13) /Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)在GeneratorFunctionPrototype.invoke上的GeneratorFunctionPrototype.prototype。(匿名函数)作为_invoke在GeneratorFunctionPrototype.invoke(/ Applications / Appium.app / Contents / Resources / app / node_modules / appium / node_modules / babel-runtime / regenerator / runtime.js:136:37)at [XCUITest]不清除日志文件。使用clearSystemFiles功能打开。 [XCUITest]杀死正在运行的进程'xcodebuild.B720A212-489B-4A48-BBDB-7119C9763406,B720A212-489B-4A48-BBDB-7119C9763406。* XCTRunner'用于设备B720A212-489B-4A48-BBDB-7119C9763406 ... [XCUITest] 'pgrep -nif xcodebuild。* B720A212-489B-4A48-BBDB-7119C9763406'没有检测到任何匹配的进程。返回码:1 [XCUITest]'pgrep -nif B720A212-489B-4A48-BBDB-7119C9763406.XCTRunner'未检测到任何匹配的进程。返回码:1 [XCUITest]删除为此次运行创建的模拟器(udid:'B720A212-489B-4A48-BBDB-7119C9763406')[iOSLog]停止iOS日志捕获

xcode appium ui-automation appium-ios
2个回答
0
投票

它说它无法找到WebDriver应用程序。你能否证实它在/Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/的存在?

如果它不存在,你的Appium安装有问题,所以我建议你重新安装npm uninstall -g appiumnpm install -g appium。无论如何,这样做可能是安全的。

还要确保重新启动设备并卸载设备上的任何现有WebDriver应用程序。


-1
投票

错误清除显示 - /Applications/Xcode.app/Contents/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}

Webdriver代理需要在设备上成功运行尝试配置Webdriver代理和Developer ID ::

  1. 打开现有的WebDriver Agent(双击WebDriverAgent.xcodeproj)
  2. 在Xcode上你有文件>新建>文件,然后你会弹出这样的东西
  3. 选择OSX - >。其他 - >选择配置设置文件。
  4. 将以下内容粘贴到新创建的文件中。

DEVELOPMENT_TEAM = xxxxxxxxx

CODE_SIGN_IDENTITY = iPhone开发者

开发团队是您的开发人员应该能够提供的团队ID。不要更改CODE_SIGN_IDENTITY。

在device.properties文件中添加此项

xcodeConfigFile =的/ usr /本地/ LIB / node_modules / Appiae / node_modules /阿皮亚-xcuitest驱动器/ WebDriverAgent / Config.xcconfig

在ConfigCapa.java文件中添加此项

capabilities.setCapability(“xcodeConfigFile”,emulatorProp.getProperty(“xcodeConfigFile”));

打开终端去

$镉在/ usr / local / lib目录/ node_modules / Appiae / node_modules /阿皮亚 - xcuitest驱动器/ WebDriverAgent /

$ mkdir -p Resources / WebDriverAgent.bundle

sh ./Scripts/bootstrap.sh -d

转到终端类型

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination'id = DeviceID'test上面命令构建输出的最后一行应该是USB上的Listening。那你就定了!

brew install libimobiledevice -HEAD

Appium运行和类型appium

要查找版本类型appium - v

© www.soinside.com 2019 - 2024. All rights reserved.