【问题标题】:The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file文件“WebDriverAgentRunner-Runner.app”无法打开,因为没有这样的文件
【发布时间】:2017-10-30 12:40:54
【问题描述】:

我已经使用终端在 Mac 上安装了 Appium 1.6.4。我还可以在 MAC 中使用 Safari 浏览器检查 iPhone WebElements。

但我需要检查 iPhone 真实设备上的键盘元素和日期选择器元素。为此,我再次安装了 Appium-desktop 1.0.2 beta2 版本。当我启动 Appium 桌面(GUI)并运行 selenium 代码时。它会引发以下错误。

XCUITest] Log file for xcodebuild test: /Users/msubramaniam/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/D3F3B94A-A324-4996-B60F-0732CEBFB00D/Session-WebDriverAgentRunner-2017-05-30_125049-1uf7KZ.log
[Xcode] 2017-05-30 12:50:49.364 xcodebuild[87735:236610] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/msubramaniam/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fb4306026c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode] 2017-05-30 12:50:49.364 xcodebuild[87735:236610] 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}
[Xcode] 
[Xcode] ** TEST EXECUTE FAILED **
[Xcode] 
[Xcode] 
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1496128849419 (12:50:49 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 87701)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Removing WDA application from device
[BaseDriver] Event 'wdaStartAttempted' logged at 1496128859998 (12:50:59 GMT+0530 (IST))

根据上面的日志,我已经导航到下面的位置,

/Users/msubramaniam/Library/Developer/Xcode/DerivedData

我发现有两个WebDriverAgent

WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy
WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs

它正在调用第二个 WebDriverAgent,但它没有“WebDriverAgentRunner-Runner.app”。

第一个 WebDriverAgent 有“WebDriverAgentRunner-Runner.app”。

那么如何调用第一个WebDriverAgent。

我也尝试使用以下命令删除 WebDriverAgent。

rm -rf /WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs

但它并没有被删除。

请提供解决方案。

【问题讨论】:

  • 我已经在终端中删除了那个 WebDriverAgent,所以它在 iphone 中被删除了。
  • 您的应用是否正确签名?
  • 能否添加这两个功能,然后尝试启动检查器:"agentPath": "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj ", "bootstrapPath": "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent"
  • WebDriverAgentRunner 构建由于“/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentLib/Routing/FBWebServer.m:12:9: 'RoutingHTTPServer/RoutingConnection.h' 文件未找到"
  • 导航到 WebDriverAgent 项目并运行 ./Scripts/bootstrap.sh

标签: ios iphone macos selenium appium-ios


【解决方案1】:

迦太基存在问题。运行下面的命令,它得到了解决:

rm '/usr/local/bin/carthage' 
brew install carthage 
brew link carthage

【讨论】:

  • 我已经使用以下命令在 iPhone 上构建了 webDriverAgent
  • "xcodebuild build test -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id='**** ****' - 配置调试"
  • 但是当我尝试通过 appium-desktop 应用程序以及使用终端启动 appium 时,WebDriverAgent 构建被删除。
  • 所以我再次运行 xcode 命令,它在终端中抛出以下错误
  • XCTRunner[434:667171] 无法加载捆绑包“WebDriverAgentRunner”,因为它已损坏或缺少必要的资源。尝试重新安装捆绑包。
猜你喜欢
  • 2018-04-17
  • 2016-02-18
  • 2017-09-29
  • 2014-08-25
  • 2016-07-15
  • 1970-01-01
  • 2023-03-15
  • 1970-01-01
  • 2015-09-08
相关资源
最近更新 更多