Appium 在 MAC 上搭建 appium1.6.3 过程

匿名 · January 01, 2017 · Last by 青谷 replied at January 21, 2019 · 8394 hits
本帖已被设为精华帖!

       自己研究好久 ios10 的真机测试今天算是成功了。新手发帖,仅供参考。原文地址https://github.com/appium/appium-xcuitest-driver

  • 1,有一个 MAC 机器,或者虚拟机,能够联网,要求 Xcode8+ MAC 系统 10.11+(我用的是 Xcode8.2 , MAC 系统 10.12)有一个 Apple ID 账号
  • 2,安装 brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • 3,安装 libimobiledevice
brew install libimobiledevice --HEAD 
  • 4,安装 carthage
brew install carthage
  • 5,安装 node(目的是安装 npm)按照官方的地址https://nodejs.org/en/download/。 下载.pkg 文件安装
  • 6,安装 cnpm(由于某种原因,直接用 npm 下载安装会有好多网络问题,安装淘宝的 cnpm 要比 npm 好用) https://npm.taobao.org/
npm install -g cnpm --registry=https://registry.npm.taobao.org
  • 7,安装 ios-deploy
cnpm install -g ios-deploy
  • 8,安装 xcpretty 如果安装出错,切换个目录再试试
gem install xcpretty
  • 10,安装 appium1.6.3(到发帖为止,最新版本是 1.6.3,要其他版本的跟上版本号就行了)这一步骤若出现安装 jDK 弹出框忽略就好
cnpm install -g appium@1.6.3

1-10 以上安装不要在 root 用户下安装。若出现权限问题,进入 root 用户将文件权限更改下。然后退出 root 用户继续安装即可

chmod -R 777 pathForFile

       关于如何进入 root 用户,我就不多说了,自己百度。
       以上都很简单,下面重点来了。

  • 11,安装 appium-xcuitest-driver 依赖        进入 WebDriverAgent 安装目录。运行 bootstrap
cd  /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent (如果WebDriverAgent 所在路径和此不同,请自行查找)
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh

       在运行 sh ./Scripts/bootstrap.sh 很可能会有因为咱们大中华局域网而网络连接失败。方法就是去 App store 下载了一个 *** 代理软件,我下了一个评分最多且免费的,的确很好用。我就不说软件名称了。
       再次运行 sh ./Scripts/bootstrap.sh 无报错就 OK 了

  • 12,用 Xcode 打开 WebDriverAgent,并且编译
           进入 WebDriverAgent 文件夹,可用如下方法
           双击 WebDriverAgent.xcodeproj 打开此项目,这个项目由 facebook 开源 有兴趣的话可以研究https://github.com/facebook/WebDriverAgent/apple。在这里我们的目的就是更改一些配置,让他能够编译成功,首先编译之前你得有 ID 账号,并且登录你的 Xcode 账户。当然如果有开发者账号那么会更好,不过我买不起,但是基于 Xcode7 之后,苹果放开了真机调试,所以没有开发者账号。也能在真机上跑起来,直接上截图。
           编译 WebDriverAgentLib
           编译 WebDriverAgentRunner
           
           若果编译的过程中有语法错误,应该是 11 步没有安装好
  • 13,建立服务 WebDriverAgent(手机和 MAC 都在同一个网段下,且都能连接外网)
           关闭 Xcode,进入 WebDriverAgent 文件夹
cd  /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=真机的udid' test

       运行到最后会发现

       而 iphone 多了一个 WebDriverAgentRunner 的 app。手动启动那个 app 的时候

       原因是我们手机并并没有信任这个 apple id 的开发者,到设置 - 通用 - 设备管理(描述文件)信任你的 apple id 就可以了。再次运行上述命令,看到如下图,就成功了,

  • 14,运行 appium
appium -p 4723
 DesiredCapabilities cap = new DesiredCapabilities();
 cap.SetCapability(MobileCapabilityType.AutomationName, "XCUITest");
 cap.SetCapability(MobileCapabilityType.PlatformVersion, "10");
 cap.SetCapability(MobileCapabilityType.DeviceName, "iPhone 6s Plus");
 cap.SetCapability(MobileCapabilityType.PlatformName, "iOS");
// cap.SetCapability("webDriverAgentUrl", "http://localhost:8100");
 cap.SetCapability(MobileCapabilityType.Udid, "c8ff753c91ee2eda9be215e4109513c75b5b30c9");
 cap.SetCapability(MobileCapabilityType.NewCommandTimeout, 3600);
 cap.SetCapability("bundleId", "com.test.app");
 IOSDriver<IOSElement> driver = new IOSDriver<IOSElement>(new Uri("http://192.168.0.20:4724/wd/hub"), cap, TimeSpan.FromSeconds(120));

       经过我的验证,用 appleId 编译 WDA 代码的时候需要链接外网。启动 WDA 服务的时候手机需要链接到外网。WDA 服务启动完成后可以把手机切回内网,测内网 app。

  • 15 卡在 Setup 的解决办法 如果卡在 Set up 上,,详细可看https://github.com/facebook/WebDriverAgent/wiki/USB-support 。 可以手动将 WDA 服务启动 ,可以运行 iproxy 8100 8100 设置端口映射。然后再开启 appium 程序 启动参数加上 webDriverAgentUrl 值为 "http://localhost:8100" 虽然麻烦,也能解决了。 至今也不能解释为什么会卡在 SetUp 上。appium 说是 facebook 的 BUG facebook 说是苹果手机的 BUG。然后就没有然后了据说 appium1.6.4 已经出了,即使卡在 Setup。appium 也能跳过去,而不像以前和 WDA 一起卡在那里,本来 appium 也是通过 usb 线去测的,所以对于 appium 的话也无所谓。
  • 16 顺便说一下。appium-desktop1.0.0 版也推出了 ,不得不说 UI 界面和功能还是可以的。搭建环境也快很多了。上一张 appium-desktop 的截图

如果想看 app 的 bundleId。只需要安装 ideviceinstaller 就可以了 ideviceinstaller -l 就可以将手机安装的 app 列出

共收到 264 条回复 时间 点赞

https://testerhome.com/markdown,排版下呗? 实在太乱了。

代码日志都用代码块

匿名 #3 · January 01, 2017

#2 楼 @Lihuazhang 这个编辑器不怎么智能,首行缩进臣妾做不到啊😭

#3 楼 @appium_test 使用 markdown,别人怎么做到的呢?

好文,讲得很详细~

WebDriverAgent 的运行速度和设备的配置关系很大,iPhone 6 及以上速度会比较接近 UIAutomation 。

思寒_seveniruby 将本帖设为了精华贴 03 Jan 08:37

加精理由:讲解详细思路清晰入门指导好文

我遇到了一些问题,过程我是参照 youtobe 上的过程,与楼主基本差不多,但我是直接安装的 npm install appium 到 1.6.3 版本。启动真机到时候,在手机安装了 WebDriver,唤起后闪退,之前编译过其它 app,默认也是信任的 webdriver 的,然后也无法唤起我想 debug 的 app。

按楼主的方法来,但是起 appium 服务跑脚本以后就一直报错,如下图。请问有什么解决方案吗?签名用的是开发者账号




xcode 报这 3 个错误是什么原因呢

匿名 #11 · January 03, 2017

#10 楼 @13564521636 11 步,没有弄好,sh ./Scripts/bootstrap.sh -d

匿名 #12 · January 03, 2017

#9 楼 @luxiaoying 开发者账号,我没有试过。流程我不知道,应该大同小异

#11 楼 @appium_test 按照 11 步的流程成功了啊,奇怪了

#8 楼 @mrlijiayi 手机端 wdarunner 删了试试

#13 楼 @13564521636 我第一次搭建的时候也遇到过这种错误,sh ./Scripts/bootstrap.sh -d 的目的就是下载 RoutingHttpServer 库和其他的一些依赖。编译错误,肯定就是没有 RoutingHttpServer,有可能是由于 sh ./Scripts/bootstrap.sh -d 有缓存了。运行 sh ./Scripts/bootstrap.sh 试试

@13564521636 的确是 sh ./Scripts/bootstrap.sh -d 没有搞定,我今天输入命令一直提示 不存在 bootstrap,原因是 carthage 没有装好,因为我以前装过,所以还需要做 brew link 什么的。 我是卸载 carthage,然后安装,根据提示搞定的。brew link --overwrite carthage

@appium_test
我遇上这个问题,不知道能否解
运行时候
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Using real device logger 'idevicesyslog'
[debug] [XCUITest] Beginning test with command 'xcodebuild build test -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=522e9f23ca5844b4e3fe09b733c611f7592b7167 -configuration Debug' in directory '/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Waiting for WebDriverAgent to start on device

这里我是等待 webdriveragent 启动,但是我看 appium test 他是启动 webdriveragent 成功。看来这里开始有区别了。

[debug] [XCUITest] Log file for xcodebuild test: /Users/luna/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/2BE20AE2-53C6-42FB-82F1-604F7FD98323/Session-WebDriverAgentRunner-2017-01-03_181921-fOdEWu.log
[debug] [WebDriverAgent] Device: Jan 3 18:19:27 iPad XCTRunner[1323] : Running tests...
[debug] [WebDriverAgent] Device: Jan 3 18:19:28 iPad XCTRunner[1323] : Continuing to run tests in the background with task ID 1
[debug] [WebDriverAgent] Device: Jan 3 18:19:29 iPad XCTRunner[1323] : Built at Jan 3 2017 17:06:52
[debug] [WebDriverAgent] Device: Jan 3 18:19:29 iPad XCTRunner[1323] : ServerURLHere->http://10.10.42.147:8100<-ServerURLHere
[debug] [WebDriverAgent] Device: Jan 3 18:19:29 iPad XCTRunner[1323] : Listening on USB

通知我 Listenting on USB
我在 appium 的官网上找到了应该是最接近的答案
https://github.com/appium/appium/issues/7313
但是,他说需要修改 js。
我打开我本机上的 js,但是已经和 7313 上解释的代码已经不一样了。
不知道有高手能帮忙指导下吗?

ps:我 mac 的时间和 iPad 的时间 都是自动获取的。所以应该不会有时间差。

#15 楼 @appium_test /usr/local/lib/node_modules/appium/node_modules/.2.5.1@appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium/node_modules/.2.5.1@appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig) 现在就剩这个报错,之前用 npm 装的现在改成了 cnpm 就还剩这个了

#16 楼 @lunamagic #15 楼 @appium_test /usr/local/lib/node_modules/appium/node_modules/.2.5.1@appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium/node_modules/.2.5.1@appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig) 现在就剩这个报错,之前用 npm 装的现在改成了 cnpm 就还剩这个了

现在参数都已经改成用 MobileCapabilityType.* 了吗?是有什么新特性吗

#12 楼 @appium_test 有几点疑问

  1. 是否需要手动运行 sh ./Scripts/bootstrap.sh -d
  2. 记得不用修改 bundleid 也可以跑
  3. 真机现在不用指定 realDeviceLogger 路径了吗
匿名 #22 · January 03, 2017

#21 楼 @neyo 1 要手动运行 sh ./Scripts/bootstrap.sh -d 我借鉴其他前辈的帖子。都是要运行的。2 修改 bundleid 是为了唯一性。因为苹果是不允许有 bundleid 一样的 2 个 app 存在的.至于 3.我表示完全没用过这个参数

匿名 #23 · January 03, 2017

#20 楼 @snowmaster 就是一个枚举类。没啥新特性

匿名 #24 · January 03, 2017

#19 楼 @13564521636 不知道什么原因,建议还是卸载 appium 及删除 appium 文件。重新安装下

匿名 #25 · January 03, 2017

#17 楼 @lunamagic 都是一些警告。参考https://github.com/facebook/WebDriverAgent/wiki/Queries看下是否能启动一个

APP

#24 楼 @appium_test 卸载光了,重装还是不行,看不懂囧

@appium_test 好吧,我还以为这样写比之前的写法好,还以为得把之前的项目都改下😅

@appium_test 我请问下在模拟器下我可以进行 appium 的测试,但是 webdriveragent 会打开两次,你这里是否有是一样的现象。

#14 楼 @neyo 你是说 webdriver 删除了重试? 这个已试过 还是一样耶

匿名 #30 · January 04, 2017

#28 楼 @lunamagic 模拟器测试并没有用过。不能为你解答

匿名 #31 · January 04, 2017

#29 楼 @mrlijiayi 我也是一个刚接触 IOS 测试的人,我只是把我搭建的过程写了下来。MAC 我也不怎么了解。所以对于我搭建没遇见过得情况。我也不知道哈😋

楼主,运行

sh ./Scripts/bootstrap.sh -d

时报错:

-e Fetching dependencies
*** Downloading peertalk.framework binary at "v1.0"
*** Downloading RoutingHTTPServer.framework binary at "v1.0.1"
*** xcodebuild output can be found in /var/folders/4p/v2qk4vf96_53_zd5tg7gw8v80000gn/T/carthage-xcodebuild.HJRAdb.log

我前面的安装都没有问题

匿名 #33 · January 04, 2017

#32 楼 @softblank 从日志上来看确定是否正确安装好 carthage。

/usr/local/lib/node_modules/appium/node_modules/.2.5.1@appium-xcuitest-driver/WebDriverAgent-master/WebDriverAgentLib/Routing/FBHTTPOverUSBServer.m:13:9: 'RoutingHTTPServer/RoutingHTTPServer.h' file not found xcode 运行时报这个错是什么原因

cnpm install -g appium@1.6.3

卡到这里很久了,有没有好的办法?
info Selendroid Downloading Selendroid standalone server version 0.17.0 from http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> /usr/local/lib/node_modules/appium/node_modules/.1.5.0@appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar

#35 楼 @joker 最好 *** 后,在安装

匿名 #37 · January 04, 2017

#36 楼 @doris_cheung 开着 lantern,也是卡在@joker那里,昨天偶然成功了,今天手贱又试了一下,再也过不去了

Check dependencies
2017-01-04 15:31:49.002 xcodebuild[9050:831581] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/meiliu/Library/Developer/Xcode/DerivedData/WebDriverAgent-hdfgyfvxzzcnljgmksmzwafvohrd/Logs/Test/D451C4A1-B317-4C3A-8C3D-9C79A2B43685/Session-WebDriverAgentRunner-2017-01-04_153147-YM31XF.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/meiliu/Library/Developer/Xcode/DerivedData/WebDriverAgent-hdfgyfvxzzcnljgmksmzwafvohrd/Logs/Test/D451C4A1-B317-4C3A-8C3D-9C79A2B43685/Session-WebDriverAgentRunner-2017-01-04_153147-YM31XF.log}
The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/usr/local/lib/node_modules/appium/node_modules/.2.5.1@appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)
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 10.2'
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 10.2'
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 10.2'
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'

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 10.2'
** TEST FAILED **

The following build commands failed:
Check dependencies
(1 failure)

编译通过,但运行 xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=真机的 udid' test 时报错,不知@appium_test 有没有遇到过这种情况

#36 楼 @doris_cheung 开了 *** 还是不行,公司的网速是有多垃圾呀 。😭

#38 楼 @lmlucky 和你一样的问题,求解决

#35 楼 @joker 前两天也遇到和你一样的问题,挂着 *** 多次重试也不行,后来按照http://blog.csdn.net/zdhsoft/article/details/53883788反复试了下,就装好了,你可以试试看吧。。。

匿名 #42 · January 04, 2017

#38 楼 @lmlucky 你的日志错误很明确。


你没有用 appleID 账户或者开发者账号去编译他。我 12 步截图中提到到选择 appleID 或者开发者账号,应该能解决此问题

匿名 #43 · January 04, 2017

#35 楼 @joker 如果 cnpm 都因为网络问题安装失败。建议用传统的老方法,配置 npm 镜像。再去 npm install -g appium。我在实际测试中发现用 cnpm 比 npm 下载成功的几率大得多。所以才建议用 cnpm。

#42 楼 @appium_test 用 apple 账户编译了,编译成功,终端执行的时候还是报错

#33 楼 @appium_test 搞定了,我贴出来的那个不算是报错,只是 xcode 的一个 log 文件没有找到,不过我安装

gem install xcpretty

的时候没有任何响应,我怀疑是 pods 没有装好,于是又有吧 cocoapods 写了重新装了一遍,现在 appium 和 WDA 都好了,不过之前的脚本都费了,好像元素的获取方式变了,现在不知道有没有关于新的 api 的 python 脚本 demo😀

#11 楼 @appium_test 1.6.3 是不是只能测试 9.0 以上的版本,以下的不兼容

#43 楼 @appium_test 定位元素用什么工具现在

#47 楼 @13564521636 启动成功之后用 Safari 打开http://localhost:8100/inspector

匿名 #49 · January 05, 2017

#46 楼 @13564521636 我现在的真机只有 9 以上的,对于 9 以下的我没有试过。

#49 楼 @appium_test
我现在一直卡在这个界面,手机应用打开黑屏,请问什么情况

匿名 #51 · January 05, 2017

@appium_test
[MJSONWP] Encountered internal error running command: Error: Xcode version [object Object] is not yet supported

提示 xcode 版本不支持 目前 xcode 版本是 8.2

有解决的办法吗?
求大神帮忙!!!

@appium_test 我这边连上真机后启动 WDA 但是无法通过 safari 进行访问查看元素:我仔细看了下 WDA 的运行日志有如下问题

2017-01-05 16:16:26.256709 XCTRunner[305:38453] Running tests...
2017-01-05 16:16:27.171236 XCTRunner[305:38453] Continuing to run tests in the background with task ID 1
Test Suite 'All tests' started at 2017-01-05 16:16:28.506
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-01-05 16:16:28.509
Test Suite 'UITestingUITests' started at 2017-01-05 16:16:28.511
Test Case '-[UITestingUITests testRunner]' started.
    t =     0.00s     Start Test at 2017-01-05 16:16:28.516
    t =     0.01s     Set Up
2017-01-05 16:16:28.526708 XCTRunner[305:38462] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1700f4c80> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only
2017-01-05 16:16:28.528188 XCTRunner[305:38453] Built at Jan  4 2017 15:16:47
2017-01-05 16:16:28.582963 XCTRunner[305:38453] ServerURLHere->http://10.252.164.253:8100<-ServerURLHere
2017-01-05 16:16:28.583873 XCTRunner[305:38453] Listening on USB

倒数第 4 行的日志显示我没有写权限,不知道这个是不是对获取元素空间有影响

匿名 #53 · January 05, 2017

#50 楼 @13564521636 WDA 服务运行的时候就是一个黑屏


我觉得你应该重启下你的 iphone 和 MAC

匿名 #54 · January 05, 2017

#52 楼 @softblank 我大胆猜测是不是和手机的开发者设置有一些关系。

@softblank Fetching dependencies
*** Downloading peertalk.framework binary at "v1.0"
*** Downloading RoutingHTTPServer.framework binary at "v1.0.1"
*** xcodebuild output can be found in /var/folders/g9/z52tkkys3v12z0zp1ngm5rg80000gn/T/carthage-xcodebuild.mOHzTn.log

前面看到你也遇上了这个问题,
你的解决方法是
我怀疑是 pods 没有装好,于是又有吧 cocoapods 写了重新装了一遍,现在 appium 和 WDA 都好了

这个我没有接触过,能否说的详细点。

#55 楼 @lunamagic 这个应该太影响,貌似是 XCODE 的输出的时候要找的一个日志文件,应该不影响,我后来重新弄了 cococaPods 还有 rvm 脚本就过去了,没太注意了。你具体现在什么问题

#54 楼 @appium_test 我现在的疑问有两个,第一是我用

cd  /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=真机的udid' test

在我自己的手机里是运行总卡在

2017-01-05 16:16:26.256709 XCTRunner[305:38453] Running tests...
2017-01-05 16:16:27.171236 XCTRunner[305:38453] Continuing to run tests in the background with task ID 1
Test Suite 'All tests' started at 2017-01-05 16:16:28.506
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-01-05 16:16:28.509
Test Suite 'UITestingUITests' started at 2017-01-05 16:16:28.511
Test Case '-[UITestingUITests testRunner]' started.
    t =     0.00s     Start Test at 2017-01-05 16:16:28.516
    t =     0.01s     Set Up

我用我们测试的手机系统版本 10.0.2 是可以运行起来 WDA 的,但是无法查看元素,(WDA 起在了手机上,通过手机浏览器访问)
浏览器中显示
"value": "Unhandled endpoint: / -- http://localhost:8100/ with parameters {\n wildcards = (\n \"\"\n );\n}",
输入http://localhost:8100/inspector 后同样返回一串 Json status:13 有错误(模拟器也是如次)

我现在只有一个手机 10.0.2 的 iOS 可以,10.1.1 的两个手机(5s,6s plus)的不行,我怀疑是 WDA 对 10.1 及以上系统支持有问题;
我的环境:
xcode 8.1
node 5.0.0
pods 1.1.1
appium 1.6.3(和这个没毛线关系)

记得更新自己的微信打赏二维码或者个人微信, 你已经错过 10 元打赏. 暂时不支持支付宝.

@softblank 完全同意你的猜想,我在 iPad 9.3.5 上可以启动,但是在我手机上 10.1.1 上和你一样 卡在 setup 。 我在 webdriveragent 上也找到了类似的问题,但是好像还没有解决。
https://github.com/facebook/WebDriverAgent/issues/429

你好,pom.xml 可不可以分享一下?好像 maven 自动引入的有些问题。非常感谢

匿名 #61 · January 08, 2017

#60 楼 @helenakeep 我用的.net

匿名 #62 · January 09, 2017

#59 楼 @lunamagic 今天特地升了 10.2,确实有这个问题。怎么这么坑爹啊

#62 楼 @appium_test 10.1.1 是有问题是吗?

个人证书只有 7 天有效期,你的是吗?

#63 楼 @13564521636 我直接升到 10.2 的,确实有问题。WDA 的问题。服务会卡在 Setup 那。

#62 楼 @appium_test 10 和 10.2 都正常是把

#17 楼 @lunamagic 你真机运行的问题,解决了吗?

匿名 #68 · January 10, 2017

#66 楼 @13564521636 10.2 也不行和 59 楼的情况一样的。

匿名 #69 · January 10, 2017

#67 楼 @junewang 等 BUG 修复呢 ,这个应该更以前一样。那时候说测 IOS 并行的时候也是 BUG 多的不得了。所以坐等。等哪个大神发帖额

提示 xcode 版本不支持 目前 xcode 版本是 8.2@XwhiteX 解决了吗

匿名 #71 · January 10, 2017

#70 楼 @2hangying 还木有 同求解!!

#69 楼 @appium_test 那现在那个版本能运行呢- - 还是说 10 以上的版本都有问题

73Floor has deleted
74Floor has deleted
匿名 #75 · January 10, 2017

我命令行装 appium 已经调通了,模拟器连接的都已经调通了,但是怎么能在一边使用 appium 的时候,一遍看 IOS 手机上界面元素结构呢?因为我写 case 需要看,难道大家都没有这个疑惑?

#62 楼 @appium_test @lunamagic 我还被同事说是设备证书的问题呢,我感觉这个好坑,关键是我们公司的 QA 和 RD 都特跟的上环境,几乎所有的设备统统升级到最新,苹果的新版本兼容是要测试,但也不能都给... 不过这个问题先放下不说,我觉得很多同仁都会遇到我的 #57 楼的第二个问题:
如何获取元素?如果 WDA 运行在了真机上,那就要去真机的 safari 上的 server 地址去查看 (模拟器在 PC 上的地址打开),可是这个 inspector 返回的 json 是有异常的,这个我很不解,有没有趟过坑的朋友站出来分享下,我最早 FB 刚出 WDA 的时候用过,那时候 WDA 还是要在 xcode 运行起来,inspector 没有问题的

*** Assertion failure in -[FBResponseFilePayload initWithFilePath:], /usr/local/lib/node_modules/appium/node_modules/.2.5.1@appium-xcuitest-driver/WebDriverAgent/WebDriverAgentLib/Routing/FBResponseFilePayload.m:24

我请求 inspector 报错信息如上

@appium_test @seveniruby
楼主,思寒哥你们好,请教一个问题,我发现在使用 appium1.6.3 版本的时候,无法再使用原来的 uiautomation 来测试 iOS9.0 以下版本的手机了,请问你们是怎么做的?这里是否可以兼容呢?

感谢

匿名 #79 · January 11, 2017

#78 楼 @carl 不能兼容,因为 Xcode8 以后就移除了 Instruments。

#79 楼 @appium_test 今天验证了下,bundleid 不用改,重签名下就可以了,可以试一下~./Scripts/bootstrap.sh -d appium 自己会去做啊,觉得没必要去手动做一遍

@appium_test 一直卡在这个地方是什么原因

gem install xcpretty 安装时弹出以下提示怎么破?
ERROR: Could not find a valid gem 'xcpretty' (>= 0) in any repository

匿名 #84 · January 11, 2017

今天测了 10.2 的模拟器,完全没问题。10.2 的真机 WDA 起不来。

匿名 #85 · January 11, 2017

#80 楼 @neyo 那就更好了。我本来就觉得这配置很麻烦

#85 楼 @appium_test 是呀,不断在优化。1.6.0 的时候还要手动去指定 realldevicelog 的路径,指定 xcodeConfigFile,比较麻烦

我按照楼主的步骤都安装了,但是真机上跑不起来,报 Unable to start WebDriverAgent
说 idevicedate 命令执行失败,我单独跑 idevicedate -u udid 的时候也的确报 Could not connect to lockdown, error code -21
手机发帖发不了图片?

appium1.6.3 没有 dmg 那怎么查看页面元素啊

毛小利 [公告] App Inspector 重磅升级 中提及了此贴 13 Jan 16:51
匿名 #90 · January 14, 2017


真机 10.2 的问题官方给我的回复这样的。这几天都太忙。没时间研究了

#75 楼 @lrw3716740 你说的这个问题怎么解决啊

87 楼的问题已解决,全部重装下就好了。现在卡在最后一步了,WebdriverAgent server 没反应,@appium_test,请问你遇到过吗?一直卡在这个日志上面等待。

#93 楼 @weamylady 这个问题你先查查日志上面然后应该会有报错,然后根据报错解决
在我印象里应该是 WebDriverAgent 没编译好的原因,大约是

cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
carthage update

然后证书记得配好(Lib 和 Runner) Run 一下

还有的可能的是安装 libimoiledevice 在 iOS10 以上一定要带 --HEAD,不是的话卸了装一下它

brew install libimobiledevice --HEAD 

Hope it works 😄

#88 楼 @mads 可以用别的项目。最简单用 1.5 的,先打开客户端,然后在命令行把 Server 起起来,然后在客户端不要点 Launch 点击 Inspector 就暂时可以用了。

#81 楼 @snow.xue 因为服务端好像配好了,但是还少了客户端呀~就是到底想让它跑什么东西,参考官方的各语言示例 😄

您好,执行第 10 步的时候一直卡在这个位置,
接下来怎么操作?

#98 楼 @doye 您好,有联系方式吗?我加你,我 qq 1749281699 周腾飞,急求,谢谢

非常感谢楼主大大的分享,通过这个帖子,我之前废掉的脚本又跑起来咯~~~

#99 楼 @tfzhou 如果是我遇到那个问题我也无解的,目前可能的方案就是拿 npm cnpm 然后/非环境 一直试,然后卡了就 ctrl-c 断重新拿命令装这样子,不用 qq 噢。

#94 楼 @doye 我试了一下 9.3 版本的,是可以正常运行:Test Suite 'All tests' started at 2017-01-17 15:34:05.068

Test Suite 'All tests' started at 2017-01-17 15:34:05.068
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-01-17 15:34:05.070
Test Suite 'UITestingUITests' started at 2017-01-17 15:34:05.071
Test Case '-[UITestingUITests testRunner]' started.
    t =     0.00s     Start Test at 2017-01-17 15:34:05.075
    t =     0.00s     Set Up
2017-01-17 15:34:05.084 XCTRunner[17244:14680309] Built at Jan 16 2017 17:26:34
2017-01-17 15:34:05.121 XCTRunner[17244:14680309] ServerURLHere->http://99.12.198.98:8100<-ServerURLHere
2017-01-17 15:34:05.122 XCTRunner[17244:14680309] Listening on USB```

看来我的问题也是跟楼上一样,10.1.1 上无法执行的 bug,坐等解决吧 TAT

#95 楼 @doye 这个方法非常好,感谢~

#75 楼 @lrw3716740 你是怎么安装调试环境的?能帮忙看一下吗?留下联系方式,加你。谢谢

#35 楼 @joker 这个问题你解决了吗?我现在也是这个情况。。。能解决的大神帮忙指点一下吧,谢谢。

楼主,第 6 步怎么执行?下载哪一个?

楼主,想问下用 appium1.6.3+xcode8+IOS10.0.2,真机测试的 case 能用 python 嘛?

#57 楼 @softblank 我也是跟你一样的问题哎……我在 9.3 上的 iPad 上虽然有 listening on usb,但是打开 wad 的 url 一样也是报错。

我使用 xcode 8.2 simulator iphone6s iOS 9.3 http://172.30.171.244:8100/inspector 也报错

status source screenshot 这几个是正常的

{
"value" : "Invalid parameter not satisfying: path\n\n(\n\t0 CoreFoundation 0x0000000108a6dd85 __exceptionPreprocess + 165\n\t1 libobjc.A.dylib 0x00000001084e1deb objc_exception_throw + 48\n\t2 CoreFoundation 。。。。。。",
"sessionId" : "27DEE885-7AE8-4412-9218-2420C71AC6AF",
"status" : 13
}

报错日志,看不懂是什么意思
t = 0.00s Start Test at 2017-01-18 14:28:36.426
t = 0.00s Set Up
2017-01-18 14:28:36.429 XCTRunner[2482:99432] Built at Jan 18 2017 11:52:54
2017-01-18 14:28:36.442 XCTRunner[2482:99432] ServerURLHere->http://172.30.171.244:8100<-ServerURLHere
t = 4.06s Find the Application "local.pid.2446" 0x7fec1c861de0
t = 4.06s Snapshot accessibility hierarchy for local.pid.2446
2017-01-18 14:33:16.813 XCTRunner[2482:99432] *** Assertion failure in -[FBResponseFilePayload initWithFilePath:], /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentLib/Routing/FBResponseFilePayload.m:24
2017-01-18 14:34:47.425 XCTRunner[2482:99432] *** Assertion failure in -[FBResponseFilePayload initWithFilePath:], /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentLib/Routing/FBResponseFilePayload.m:24

@appium_test
iphone 6s plus ios 10.1.1
大家好 13 步的时候
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/2s/jfjfzxb97191rgh80hqm_9yw0000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.TP35YO/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
Test Suite 'All tests' started at 2017-01-19 14:06:38.163
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-01-19 14:06:38.165
Test Suite 'UITestingUITests' started at 2017-01-19 14:06:38.166
Test Case '-[UITestingUITests testRunner]' started.
t = 0.00s Start Test at 2017-01-19 14:06:38.169
t = 0.00s Set Up
Killed: 9
被 kill 掉了 ,求大神解答下

#50 楼 @13564521636
你好 ,在下面那个位置一直停留的问题解决了吗?是 iOS10.1.1 的系统不行的问题吗?10.2 可以不
Test Suite 'All tests' started at 2017-01-19 14:06:38.163
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-01-19 14:06:38.165
Test Suite 'UITestingUITests' started at 2017-01-19 14:06:38.166
Test Case '-[UITestingUITests testRunner]' started.
t = 0.00s Start Test at 2017-01-19 14:06:38.169
t = 0.00s Set Up

#102 楼 @weamylady 我也是用 9.3 的真机可以运行,但是真机上 wda 打开之后就自动退到后台了,打开 wda 是黑屏的 第一次接触这个不太懂怎么用。你那也是这样的吗?

#48 楼 @appium_test 您好,请问一下我在用 safari 访问http://172.16.23.2:8100 显示正常

{
"value" : "Unhandled endpoint: \/ -- http:\/\/172.16.23.2:8100\/ with parameters {\n wildcards = (\n \"\"\n );\n}",
"sessionId" : "AE6BF076-84FD-4C1C-8199-ABD2B3595E86",
"status" : 1
}
但是访问http://172.16.23.2:8100/inspector的时候浏览器中什么都没显示,没有显示页面元素啊。这是为什么呢?

#81 楼 @snow.xue 怎样了?我也是这样。卡在这里了

楼主辛苦了,遇到了这两个问题,

#100 楼 @seven9t 您好,能留一个联系方式吗?求帮忙,谢谢。

求解@yefengjun,你的解决了吗?

1.6.3 还支持 python 脚本吗?各位大神求解啊!

#117 楼 @xlth1947 没有解决,我重新在 git 上下了一个 WebDriverAgent 跑了一下 终端上信息是:

2017-01-20 12:23:01.818 XCTRunner[6819:524048] *** Assertion failure in -[FBResponseFilePayload initWithFilePath:], /Users/yefengjun/Downloads/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentLib/Routing/FBResponseFilePayload.m:24

你跟我的情况一样吗?

@utopia 我跟你报的错是一样的
XCTRunner[2482:99432] *** Assertion failure in -[FBResponseFilePayload initWithFilePath:], /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentLib/Routing/FBResponseFilePayload.m:24
XCTRunner[2482:99432] *** Assertion failure in -[FBResponseFilePayload initWithFilePath:], /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentLib/Routing/FBResponseFilePayload.m:24
后来你解决了吗

@yxrs89 没有解决,估计是官网的 bug,只能坐等

@yefnegjun 我之前是没有文件,重新下载后也是这样,完全懵逼。。。。

#116 楼 @tfzhou 有什么问题直接在这里问吧,大家还可以一起看看,你现在是卡在哪里。

@appium_test 请问使用 WebDriverAgent 的话是不是必须要有测试 app 的源码啊?xcodebuild -project 必须得是.xcodeproj 文件吗?

@yefnegjun @appium_test 我也想问这样问题,如果是打包后的 ipa 形式的可以吗

#125 楼 @yxrs89 我也是刚开始接触移动端 APP 的自动化测试,也不太清楚= =不好意思。我们这里开发一般不会给我们源码,挺麻烦的。之前再学习怎么用 appium 就因为跑不起来暂时就没搞。看看楼主怎么说吧

@yefnegjun 哈哈,你得情况跟我一样,不怕见笑,之前都没用过 mac 电脑我也是刚开始接触这块,什么证书编译全都不懂,android 很方便可以直接用 APK,我们得开发也不给源码。所以不知道 ipa 可不可以直接用。如果不行得话,看来要自己学着写个 app 包来测试了

在使用真机调试的时候,签名按照说明都设置过了,
运行 xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=xxxxxxxxxxxxxxxxxxxxxxxxxx' test

最后提示:

The following build commands failed:
CodeSign /Users/among/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework
CodeSign /Users/among/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentLib.framework/Frameworks/Peertalk.framework
(2 failures)

这两个也需要签名,感觉不需要啊。

#127 楼 @yxrs89 我觉得最后可能就像楼主这样 用 Appium 启动的话应该用 debug 的就行了 等节后回来找开发要个 debug 版的 ipa 装一下试试。都是新手,多交流吧

@yefnegjun 好的,兄弟能否留个 QQ 以便后面一起交流学习

#130 楼 @yxrs89 刚看到 450968560 我 qq

#32 楼 @softblank 想问一下,问题解决了吗?我也遇到和你一样的问题,但是重新装还是不行。

运行你给的例子时候,真机上刚打开进入黑色页面,就闪退出来了,怎么解决?谢谢

#102 楼 @weamylady 我也是卡在这里,
上面一个提示,文件找不到,你解决了吗?

请问楼主,确认是用 iOS 10 可以用吗?据说 appium 不支持 iOS 10?

#48 楼 @appium_test 我 10.0.2 的 5s 在 safari 上 localhost:8100/status 显示正常,但是一使用 inspector 就返回一个错误的 json,我看了下 WDA 的日志有个错误不知道你遇到过没有:

2017-02-03 10:47:42.914060 XCTRunner[244:4940] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1740e3a00> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only

博主,新年好啊!
我运行到这一步的时候卡在这里了

这个是哪里出状况了呢?

#112 楼 @yefnegjun 后面这些问题卡住了,并没有解决

#118 楼 @xlth1947 支持啊,rf 运行没问题

#134 楼 @tfzhou 你这个没影响吧,好像是编译成功了呀!

#140 楼 @weamylady 之后的操作呢?后面的不会了,没思路了,求指教。

#140 楼 @weamylady
上面一个箭头内容在哪里配置?第二个的内容怎么才能实现?

#136 楼 @softblank @appium_test

请问这个错误重要吗?
执行测试用例的时候一直卡在 waiting for webdriveragent server to finish loading 怎么解决呢?

@lmlucky 我跟你的问题差不多,也是报类似的错误,想问下找到解决的办法了么

我貌似有根据楼主的步骤来选择 personl team,然后再 xcode 里 buid 也没报错的...

=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies
The file “ProjectSettings.xcconfig” couldn’t be opened because there is no such file. (/Users/thanksdanny/Documents/test tools/Appium/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Configurations/ProjectSettings.xcconfig)
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 10.2'
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 10.2'
2017-02-06 21:14:06.200 xcodebuild[96714:55994925] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/thanksdanny/Library/Developer/Xcode/DerivedData/WebDriverAgent-aglwdgpknbtvkxddxdjubmhlahqx/Logs/Test/3433B8F6-CB8E-4604-AB87-BA4EA4064E5F/Session-WebDriverAgentRunner-2017-02-06_211403-BcjLh0.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/thanksdanny/Library/Developer/Xcode/DerivedData/WebDriverAgent-aglwdgpknbtvkxddxdjubmhlahqx/Logs/Test/3433B8F6-CB8E-4604-AB87-BA4EA4064E5F/Session-WebDriverAgentRunner-2017-02-06_211403-BcjLh0.log}
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 10.2'
Code signing is required for product type 'UI Testing Bundle' in SDK 'iOS 10.2'


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 10.2'
** TEST FAILED **


The following build commands failed:
    Check dependencies
(1 failure)

@thanksdanny

"Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor."这个在 xcode 中设置下就可以了,选择 “WebDriverAgentRunner”

我也同样遇到 “Unable to start WebDriverAgent: Error: Command 'idevicedate -u xxxxxxx' exited with code 255” 的问题,WebDriverAgent 单独运行的时候也是卡在 set up 那里,求解决
iOS 10.1.1 真机

#145 楼 @xiaobeiying 修改完是 build 成功了,然后再 buid 原来的错误提示已经没了,但是又有另外一个提示:

Testing failed:
    Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **

其实也就说明 build 成功了,但是只是测试失败么

@xiaobeiying 回头看回教程,原来我是正常的!!哈哈哈感谢你帮忙!!

#148 楼 @thanksdanny 你的真机是什么版本的?WebDriverAgent 可以正常运行?

#149 楼 @xiaobeiying 我的是 10.2,现在轮到卡楼层中说的卡在 setup 的问题....还没跑成功

MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/mc/5hjzf67149l8qny05tsr2s000000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/64e1cbefb70e4e693057c7e51515a76e/f4068075a76a39c8de72e608f935e1abe9ebc030/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/thanksdanny/Library/Developer/Xcode/DerivedData/WebDriverAgent-aglwdgpknbtvkxddxdjubmhlahqx/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/mc/5hjzf67149l8qny05tsr2s000000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.0uMoGm/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
    dst_ipa: /var/folders/mc/5hjzf67149l8qny05tsr2s000000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.0uMoGm/WebDriverAgentRunner-Runner.app_sparse.ipa
__MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/mc/5hjzf67149l8qny05tsr2s000000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.0uMoGm/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/mc/5hjzf67149l8qny05tsr2s000000gn/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.0uMoGm/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
Test Suite 'All tests' started at 2017-02-07 20:57:09.741
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-02-07 20:57:09.742
Test Suite 'UITestingUITests' started at 2017-02-07 20:57:09.742
Test Case '-[UITestingUITests testRunner]' started.
    t =     0.00s     Start Test at 2017-02-07 20:57:09.743
    t =     0.00s     Set Up

151Floor has deleted

@lunamagic @softblank 卡在 setup 的问题貌似 issue 里给了解决方案,就是重启电脑跟手机....不过我试了下貌似还不行..不知你们解决了没

超过 10.0 的系统好像都会卡在 set up 这边,inspector 不管是啥系统一直起不来,目前没有看到解决方案。。。

#149 楼 @xiaobeiying 我换了部 iOS 9 的测试机,已经可以成功运行了

大神们小弟没头绪啊,inspector 一直打不开,现在 app 是可以安装并唤起了,但是一致没法更新元素,如下图:求大神解救

#145 楼 @xiaobeiying "Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the project editor."这个在 xcode 中设置下就可以了,选择 “WebDriverAgentRunner”

你好,这个具体是怎么设置的?

#154 楼 @thanksdanny 嗯那,是的,换成 iOS 9 可以正常跑了,应该是还没有支持 iOS 10

#156 楼 @lucai 具体在 Xcode 中操作就可以了,详见如下截图:

求贴一张,成功运行的 inspector 截图

#137 楼 @tfzhou 你好的我的,一直卡在
请问你是怎么解决的,必须 *** 吗?

@softblank softblank 你的问题解决没有?

#160 楼 @ios_sxw 我的也是卡在这边,但是貌似安装不会影响,你可以直接看看安装成功了吗?

#160 楼 @ios_sxw 我也卡在这里。我 *** 了仍然如此。你解决没有

楼主及各位层主,我在 13 步的时候出现上面的报错,请问大家有遇到吗?该怎么解决,帮忙出谋划策下,卡在这里 2 个晚上了😂 😂

166Floor has deleted

#165 楼 @xiaoxiaoshell 报错说设备 id xcode 上查不到,换个存在的 id

168Floor has deleted

楼主有详细联系方式吗


步骤 8 出现问题, 看了一下淘宝镜像还是没装上

@xiguamaomaoqiu 我这边不用那个了,我自己找的 app-inspector,并配置环境,之后使用 app-inspector 抓取元素

#167 楼 @utopia 我这个 udid 就是我的 iPhone6 的 udid 呢,也是过了其他的手机,还是不行,操作这一步骤的时候只是需要和 Mac 在同一个网络的同一个网段,已经这样了,还是不行,可还有其他建议?

#172 楼 @xiaoxiaoshell 看日志是 mac 没有识别这个手机,usb 连接手机了么。检查下 xcode 的可识别的设备

174Floor has deleted

第 13 步,执行时报这个错:
###
Jackey-Mac:WebDriverAgent Jackey$ xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=5fec064b64dbab3b3f988abb65726b52ac03b7d2' test
2017-02-17 16:05:34.321 xcodebuild[5766:190467] [MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk; its version (9.2) is below required minimum (10.2) for the iphoneos platform.
2017-02-17 16:05:34.322 xcodebuild[5766:190467] [MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk; its version (9.2) is below required minimum (10.2) for the iphoneos platform.
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ id:5fec064b64dbab3b3f988abb65726b52ac03b7d2 }

Available destinations for the "WebDriverAgentRunner" scheme:
{ platform:macOS, arch:x86_64h }
Jackey-Mac:WebDriverAgent Jackey$
###

macdeMacBook-Pro:WebDriverAgent mac$ sh ./Scripts/bootstrap.sh 
-e Fetching dependencies
-e Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN web-driver-inspector@1.0.0 No repository field.
Validating Inspector
No errors!
Cannot find module 'eslint-config-appium'
Referenced from: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/.eslintrc
Error: Cannot find module 'eslint-config-appium'
Referenced from: /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/.eslintrc
    at ModuleResolver.resolve (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/util/module-resolver.js:74:19)
    at resolve (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:478:25)
    at load (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:495:26)
    at configExtends.reduceRight (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:391:36)
    at Array.reduceRight (native)
    at applyExtends (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:362:28)
    at Object.load (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:529:22)
    at loadConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:63:33)
    at getLocalConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:130:29)
    at Config.getConfig (/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:259:26)

这个报错怎么解决,有谁遇到嘛,一直没看到有遇到这个情况的

上面说的问题 我通过安装提示缺少的模块后,又报这样错误,谁遇到过给解决下

macdeMacBook-Pro:WebDriverAgent mac$ sh ./Scripts/bootstrap.sh -d
-e Fetching dependencies
macdeMacBook-Pro:WebDriverAgent mac$ sh ./Scripts/bootstrap.sh 
-e Fetching dependencies
-e Building Inspector
Creating bundle directory...
Fetching Inspector dependencies...
npm WARN web-driver-inspector@1.0.0 No repository field.
Validating Inspector
No errors!

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Inspector/js/app.js
  12:18  error  Unable to resolve path to module 'js/http'                import/no-unresolved
  13:20  error  Unable to resolve path to module 'js/screen'              import/no-unresolved
  14:31  error  Unable to resolve path to module 'js/screenshot_factory'  import/no-unresolved
  15:18  error  Unable to resolve path to module 'js/tree'                import/no-unresolved
  16:22  error  Unable to resolve path to module 'js/tree_node'           import/no-unresolved
  17:25  error  Unable to resolve path to module 'js/tree_context'        import/no-unresolved
  18:23  error  Unable to resolve path to module 'js/inspector'           import/no-unresolved
  27:14  error  Missing space before function parentheses                 space-before-function-paren

#174 楼 @xiguamaomaoqiu 感谢你的回复,我已经成功安装 1.6.3 Mac 10.12.1,首页我没有按照你的步骤去修改 Xcodepath(因为我没找到😂 ),我是因为在设置 Xcode 的时候,漏设置了 WebDriverAgentRunner 的配置,其实按照帖主的截图配置,是完全 OK 的,哎,都怪自己粗心了

就是上图左侧的 2 个目录对应的 general 和 build setting 要细心,设置对了,这里主要注意 2 点:
1,webdriveragentlib-general 里 bundle identidfier 一定要是唯一,如果你修改了不是唯一,可以多设置几个,其次 general 里的 bundle identifier 和 build setting 里的 product bundle identifier 要保持一致
2,webdriveragentrunner-general-signing 里的 team 要和 webdriveragentlib-general-signing-team 设置为一样;webdriveragentrunner-buildsetting-product bundle identifier 要和 webdriveragentlib 目录下 build setting 设置一样
这样设置成功后运行 codebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=你 USB 连接手机的 udid' test 应该就能通过了

你好~我这边在执行 cnpm install -g appium@1.6.3 命令后,跑了一段时间,然后就停在了

HeminWon-Extranet:WebDriverAgent Hm$ ./Scripts/bootstrap.sh
Fetching dependencies
*** Downloading peertalk.framework binary at "v1.0"
*** Downloading RoutingHTTPServer.framework binary at "v1.0.1"
A shell task (/usr/bin/env unzip -qq -d /var/folders/65/k7c4ccfx30s6ns328bt6jbv00000gn/T/carthage-archive.cXcrLY /Users/Hm/Library/Caches/org.carthage.CarthageKit/binaries/RoutingHTTPServer/v1.0.1/1724992-RoutingHTTPServer.framework.zip) failed with exit code 9:
[/Users/Hm/Library/Caches/org.carthage.CarthageKit/binaries/RoutingHTTPServer/v1.0.1/1724992-RoutingHTTPServer.framework.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/Hm/Library/Caches/org.carthage.CarthageKit/binaries/RoutingHTTPServer/v1.0.1/1724992-RoutingHTTPServer.framework.zip or
        /Users/Hm/Library/Caches/org.carthage.CarthageKit/binaries/RoutingHTTPServer/v1.0.1/1724992-RoutingHTTPServer.framework.zip.zip, and cannot find /Users/Hm/Library/Caches/org.carthage.CarthageKit/binaries/RoutingHTTPServer/v1.0.1/1724992-RoutingHTTPServer.framework.zip.ZIP, period.

运行脚本过程错误,

#136 楼 @softblank 请问你这个问题如何解决了;
2017-02-03 10:47:42.914060 XCTRunner[244:4940] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1740e3a00> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only

我现在启动真机就是黑屏,终端报错
[User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x1740eff80> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only
2017-02-20 16:24:55.354716 XCTRunner[249:5672] Built at Feb 20 2017 14:04:52
2017-02-20 16:24:55.434906 XCTRunner[249:5672] ServerURLHere->http://10.88.29.132:8100<-ServerURLHere
2017-02-20 16:24:55.436862 XCTRunner[249:5672] Listening on USB
在 Safari 中无法打开http://10.88.29.132:8100

#178 楼 @xiaoxiaoshell 我回错了😂 那个改 xcode 版本的根本不能解决,再说我本来就是要用 xcode8.2+appium1.6.3,怎么又降回去呢...
请问你是怎么弄成功的,我这种情况应该怎么往下进行, xcode 是 8.2, 手机 6s 是 10.2, mac10.12, 后面几位同学说什么不支持 iOS10.x 的, 应该不会吧,别人的 10.x 的怎么跑起来的, 你的是多少? 下面是 terminal 上的 log, 能帮我看下吗, 另外我手机上的 WebDriverAgentRunner 一打开就闪退, 测试用的公司的苹果开发者账号, bundle id 和 team 的都是按照上面那样设置的,build 没有问题

莫等闲 mac 上安装 appium 遇到困惑求解答 中提及了此贴 21 Feb 09:56

超级棒,已经调通了,以前写的测试代码可以用了,想给楼主一百个赞。

中间遇到过
Testing failed:
Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **

其实是需要等待一段时间,到 log 出到:
Test Suite 'All tests' started at 2017-02-21 17:23:31.790
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-02-21 17:23:31.795
Test Suite 'UITestingUITests' started at 2017-02-21 17:23:31.797
Test Case '-[UITestingUITests testRunner]' started.
t = 0.00s Start Test at 2017-02-21 17:23:31.803
t = 0.01s Set Up

再继续下面的步骤就没有问题了。

#182 楼 @xiguamaomaoqiu 我的 Mac 系统是 10.12,手机也是 10.0.2,你闪退是不是因为没有在设置,描述文件里信任这个 APP 呀

#182 楼 @xiguamaomaoqiu

注意:该视频的英文带浓重印度口音,必须开启字幕才能听懂

我是跟着这个视频安装好的,你也按照这个视频一步步的操作看看,遇到问题再交流,可能还是你的哪一步漏了什么

#185 楼 @xiaoxiaoshell 不是, 信任了

#186 楼 @xiaoxiaoshell 好的,我试试, 另外我想问一下 你的 inspector 用的是什么

#179 楼 @slowy 我也是一样的问题,还没有解决

190Floor has deleted

error: xcodebuild failed with code 65 ,在真机上遇到这个错误,appium1.6.3,xcode8.1,iOS 10.0.2,有遇到的吗?求解答

Hong 回复

我在虚拟机上也遇到了这个问题,请问有解决么

@mikiXuan 我也没有解决,装了 1.6.4Beta 还是这个问题,可以参考https://testerhome.com/topics/6636

Hong 回复

我重新编译了一下 WebDriverAgent 就好了。。。


这样的问题有人遇到过吗,求指导😳

小背影 回复

我设置 WebDriverAgentRunner 时总是报以下错误,请问一下这是什么问题呢😰

明明设置 WebDriverAgent 是正常的呢

第七部的时候提示 Install fail! Error: Run "sh -c ./src/scripts/check_reqs.js && xcodebuild" error, exit code 1
使用的是 $ sudo cnpm install -g ios-deploy

monley 回复

你好,我运行./Scripts/bootstrap .sh 命令时,遇到了同样的问题,请问有解决的办法吗

@appium_test 前面都可以成功到了第 13 步,报一样的错,但我不是没有信任的问题,而是每次打开都闪退

我也卡在 Set Up 了。。。WebDriverAgentRunner 闪退。。。

Tsn_09 回复

我真机卡在 setup 但是虚拟机同样也是 10.2 系统,但是可以到打开端口那一步,不知道什么情况。
WebDriverAgent 应用闪退好像不影响 client 端的脚本执行,每次开始执行脚本前都会进入 webdriverAgent 应用一次,然后继续走你写的脚本。

安装步骤步骤 10 cnpm install -g appium@1.6.3 卡住了不动了

赵欢 回复

*** 下载会更容易一些

小茗同学 回复

已经 *** 了,但是,一直卡着半天了

赵欢 回复

我当时也是,这就靠运气了,也许和网络环境有影响,如果好长时间都没有动,你就去根目录下把 appium 删除掉,再重新下载一下


请问卡到这里是什么意思? 是配置的不对么? 还有 WebDriverAgentRunner 闪退一下。哪位大神能帮忙解决一下啊



请问卡到这里是什么意思? 是配置的不对么? 还有 WebDriverAgentRunner 闪退一下。哪位大神能帮忙解决一下啊

163 的 appium 也提示这个错误码

Joyce306 安装 appium for mac 卡住了 中提及了此贴 04 Mar 11:07
ohmy7on 回复

你好,请问你这个 WebDriverAgentRunner 设置的问题解决了么?我也是这里提示这两个问题,其他都是正常的~😳

212Floor has deleted

添加设备时报出
A build only device cannot be used to run this target
我应该怎么做

sudo npm install -g ios-deploy --unsafe-perm=true

hhhh0213 回复

我是连上真机,然后像如图最上面的红框选中真机,报错就没有了

ohmy7on 回复

好的!多谢~~

为什么我照着步骤安装后,运行这个命令:
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=*********' test

结果提示错误:

zujie 回复

我的环境和你一样,遇到的问题也和你一样,你这个解决了吗?

 Referenced from: /var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/XCTRunner
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
    /private/var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/14E39B1E-8251-4E3C-A1D0-434C2A6DC1DF/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
2017-03-14 14:12:33.688 xcodebuild[21705:136533] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "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}

Testing failed:
    Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **
thanksdanny 回复

我也是卡在这个位置就一直不动了,然后后面的就搞不了,app-inspector 也启动不了

xiaoxiao 回复

10.2 系统好像没有信任这个东西了,也不会有提示,如何破?

Hakurokkk 回复

我 xcodebuild 时就一直停在
这个位置,然后就不动了,启动 app-inspector 就提示
,这样可以?

运行到 13 步的时候报错,怎么解决?
各种 google 没找到办法,求帮助。
OSX 系统:10.12.3
手机 iOS:10.0.2
Xcode:8.2.1

2017-03-15 11:18:10.856 xcodebuild[1602:8419]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/xiaoxue/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/E0B90FF5-E45B-45B5-B610-965D5247106A/Session-WebDriverAgentRunner-2017-03-15_111810-MU8njH.log
2017-03-15 11:18:10.857 xcodebuild[1602:8414] [MT] IDETestOperationsObserverDebug: (52DEA282-9FC3-4890-9EF9-40E21DE6A28D) Beginning test session WebDriverAgentRunner-52DEA282-9FC3-4890-9EF9-40E21DE6A28D at 2017-03-15 11:18:10.855 with Xcode 8C1002 on target <DVTiOSDevice: 0x7ff4067782b0> {
        deviceSerialNumber:         F18xxxxxxxMQ
        identifier:                 xxxxxxxxxxxxxxx
        deviceClass:                iPhone
        deviceName:                 iPhone 6
        deviceIdentifier:           xxxxxxxxxxxx
        productVersion:             10.0.2
        buildVersion:               14A456
        deviceSoftwareVersion:      10.0.2 (14A456)
        deviceArchitecture:         arm64
        deviceTotalCapacity:        11968585728
        deviceAvailableCapacity:    6633230336
        deviceIsTransient:          NO
        ignored:                    NO
        deviceIsBusy:               NO
        deviceIsActivated:          YES
        deviceActivationState:      Activated
        deviceType:                 <DVTDeviceType:0x7ff406612120 Xcode.DeviceType.iPhone>
        supportedDeviceFamilies:    (
    1
)
        applications:              (null)
        provisioningProfiles:      (null)
        activityProgress:          -2
        activityTitle:
        hasInternalSupport:        NO
        isSupportedOS:             YES
        developerDiskMountError:   (null)
(null)
    } (10.0.2 (14A456))
=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies

MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/b52998ac4571334a6ce75968a8a691a2/e01d730b625c83ad877fb699701bc35ea3e800ec/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/xiaoxue/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
    dst_ipa: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa
__MDMDirectoryDiff_block_invoke.37:1473 calling writeDictToFile with: /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/f3/fsxd3f315vg22yc0997bxrl00000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.NVj5Yt/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
dyld: Library not loaded: @rpath/XCTest.framework/XCTest
  Referenced from: /var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/XCTRunner
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
    /private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/4492CC47-E278-4D20-93DD-B9FF170479C8/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
2017-03-15 11:18:27.561 xcodebuild[1602:8414] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "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}

Testing failed:
    Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **

@appium_test

云敛晴空 回复

插其他电脑上会出现信任吗?或者换台手机试试?查下手机和电脑建立初始信任的设置什么的

steven 回复

遇到一样的问题,请问解决了吗?

zujie 回复

请问,你这个问题解决了吗?

和曦 回复

不好意思今天才看到🙏 WDA 闪退是正常现象,没有问题

zujie 回复

谢谢!
#222 楼的 log 也是正常的么?
我找了很多资料,最后看到https://github.com/facebook/WebDriverAgent/issues/429上面说是 Xcode 的问题。
我的环境:
OSX:10.12.3
Xcode:8.2.1
iPhone:10.0.2
appium:1.6.3 或 1.6.4 或 appium-Desktop1.0.0@beta3

无论是 Xcode,还是 XcodeBuildTools,或者是重启 Mac 和 iPhone,都不行

xiaoxiao 回复

没有出现,我现在的问题应该就是卡在 xcode build 那卡住了,感觉 build 没完全成功,后面的就无法进行,我查了下,好多人都是卡在那个位置

楼主:
cnpm install -g appium@1.6.3 执行这里之后,
info UiAutomator2 downloading UiAutomator2 Server test APK v0.1.3 : https://github.com/appium/appium-uiautomator2-server/releases/download/v0.1.3/appium-uiautomator2-server-debug-androidTest.apk
出现这个就一直没反应了,请问这是为什么啊

楼主,12 步编译 WebDriverAgentLib 的时候报错是什么原因啊,入门菜鸟,求帮忙

我也遇到了~怎么解决的?

Anonymous 回复

我也出现了这个错,大神你这个问题是怎么解决的?

虚拟机里可以跑成功,真机不行。

跑模拟器 Xcode Debug 的 log:

2017-04-06 13:47:40.352 XCTRunner[4833:113945] Running tests...
2017-04-06 13:47:48.499 XCTRunner[4833:113945] Continuing to run tests in the background with task ID 1
Test Suite 'All tests' started at 2017-04-06 13:47:48.672
Test Suite 'WebDriverAgentLib.framework' started at 2017-04-06 13:47:48.674
Test Suite 'WebDriverAgentLib.framework' passed at 2017-04-06 13:47:48.674.
     Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-04-06 13:47:48.676
Test Suite 'UITestingUITests' started at 2017-04-06 13:47:48.677
Test Case '-[UITestingUITests testRunner]' started.
    t =     0.00s     Start Test at 2017-04-06 13:47:48.678
    t =     0.00s     Set Up
2017-04-06 13:47:48.685 XCTRunner[4833:113945] Built at Apr  6 2017 11:53:41
2017-04-06 13:47:48.705 XCTRunner[4833:113945] ServerURLHere->http://192.168.199.187:8100<-ServerURLHere
    t =    47.95s     Find the Application "local.pid.4769" 0x6080002a69c0
    t =    47.95s         Snapshot accessibility hierarchy for local.pid.4769

本地访问 server 后返回:

{
  "value" : "Unhandled endpoint: \/ -- http:\/\/192.168.199.187:8100\/ with parameters {\n    wildcards =     (\n        \"\"\n    );\n}",
  "sessionId" : "41A81AA0-6090-4419-9D81-C1EFA27ACD59",
  "status" : 1
}

本地访问 status 返回:

{
  "value" : {
    "state" : "success",
    "os" : {
      "name" : "iOS",
      "version" : "10.3"
    },
    "ios" : {
      "simulatorVersion" : "10.3",
      "ip" : "192.168.199.187"
    },
    "build" : {
      "time" : "Apr  6 2017 11:53:42"
    }
  },
  "sessionId" : "41A81AA0-6090-4419-9D81-C1EFA27ACD59",
  "status" : 0
}

本地访问 inspector 截图:

跑真机时 Xcode Debug 的 Log:

dyld: Library not loaded: @rpath/XCTest.framework/XCTest
  Referenced from: /var/containers/Bundle/Application/67D95C0C-0253-4654-A88B-1C646458E939/WebDriverAgentRunner-Runner.app/XCTRunner
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/67D95C0C-0253-4654-A88B-1C646458E939/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/67D95C0C-0253-4654-A88B-1C646458E939/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
    /private/var/containers/Bundle/Application/67D95C0C-0253-4654-A88B-1C646458E939/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/67D95C0C-0253-4654-A88B-1C646458E939/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'
(lldb) 

试过很多方法,现在怀疑是 Xcode 的问题
虽然我的 Xcode 从 8.2.1 升级到了 8.3,iOS 从 10.0.2 升级到了 10.3 和 10.3.1,但都没有解决:(
https://github.com/facebook/WebDriverAgent/issues/429
https://github.com/facebook/WebDriverAgent/issues/521

现在我该怎么办?

卡卡 回复

这个情况解决了吗?

tfzhou 回复

你现在知道这个地方 继续如何操作了吗? 我也不理解这里是怎么出现的

monley 回复

我和你的问题一样,请问解决了吗?

匿名 #237 · April 19, 2017

大半夜的,又把贴编辑了下,本来想要发第二篇帖子的,但是懒啦,没有办法,就再第一篇帖子上修改了下

运行 iproxy 8100 8100
一直停在了 waiting for connection 这里

在想问一下。你的 appium-desktop1.0.0 的抓捕元素界面如何打开的,需要配置什么东西吗

240Floor has deleted
匿名 #241 · April 19, 2017
梦梦GO 回复

我直接下载的 appium-desktop1.0.0 ,编译了 appium-desktop1.0.0 里面的 WDA 程序,至于其他所要的软件本身我 MAC 就已经按照教程安装了

匿名 #242 · April 19, 2017
梦梦GO 回复

运行 iproxy 8100 8100
一直停在了 waiting for connection 这里 这是正常现象

monley 回复

将 cd /usr/local/lib/node_modules/appium/

/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/
两文件夹中的.eslintrc 文件中的"extends": "appium"注释掉,就可以继续往下执行了,我目前这么做没有产生其他错误

zhang 回复

请问.eslintrc 文件具体位置是在哪儿?在/usr/local/lib/node_modules/appium/和/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/两个目录下没有找到,也没有搜索到名称是 eslintrc 的文件

Z #245 · May 03, 2017

@AlexSun 我也没找到。你现在可以了吗

请问怎么编译 appium-desktop1.0.0 里面的 WDA 程序?我是直接下 dmg 安装的

我按照这个帖子上的方法做了一遍,但是在用 IOSDriver.getElement(By) 这个方法时,所有的元素都报错:NoSuchElementException,我想知道为啥找不到元素啊?页面上明明是有这个元素的。AndroidDriver.getElement(By) 就可以找到。求大神指导~

@appium_test 您好,想问一下您在用 appium-desktop 的时候 启动有没有碰到过 error:enotfound 这个错啊,我的 Xcode 版本是 8.3.2 真机是 IOS 10.3.1 之前我 Xcode 还是 8.1 的时候能正常启动...

第 11 步执行 sh ./Scripts/bootstrap.sh 的时候 报 Cannot find module 'eslint-config-appium' 怎么弄呢?😓

candicehy 回复

你看看这个能解决你的问题吗 https://testerhome.com/topics/7192

Boxer 回复

Test Suite 'UITestingUITests' started at 2017-05-23 09:57:09.356
Test Case '-[UITestingUITests testRunner]' started.
t = 0.00s Start Test at 2017-05-23 09:57:09.359
t = 0.00s Set Up
2017-05-23 09:57:09.377961+0800 XCTRunner[11010:4516011] [User Defaults] Failed to write value for key AutomationDisableFauxCollectionCells in CFPrefsPlistSource<0x170100bd0> (Domain: com.apple.Accessibility, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null)): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access, switching to read-only
2017-05-23 09:57:09.379684+0800 XCTRunner[11010:4515926] Built at May 22 2017 10:52:51
2017-05-23 09:57:09.414419+0800 XCTRunner[11010:4515926] ServerURLHere->http://99.48.97.201:8100<-ServerURLHere

目前一直卡在这里,请问该怎样解决呢?

回复

你好,我也遇到跟你一样的问题,一直卡在这里,没有出现 Listening on USB 这样的 log,请问你解决了吗
2017-05-23 09:57:09.414419+0800 XCTRunner[11010:4515926] ServerURLHere->http://99.48.97.201:8100<-ServerURLHere

AlexSun 回复

你好,请问你的问题现在解决了吗,我也遇到同样的问题:执行 sh ./Scripts/bootstrap.sh 的时候 报 Cannot find module 'eslint-config-appium',并且在目录/usr/local/lib/node_modules/appium/和/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/ 也没有找到.eslintrc 文件~

cherrytanlinsi 回复

还没有呢,卡了好久了

monley 回复

请问问题解了吗

lee Appium1.6.6 Beta 版 源码安装 for Mac 中提及了此贴 03 Jun 23:16

gem install xcpretty 出错,切换目录也是,应该怎么处理啊

sudo gem install -n /usr/local/bin xcpretty

楼主,出现以下提示,该怎么解决啊?
Cannot find module 'eslint-config-appium'
Referenced from: /usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/.eslintrc
Error: Cannot find module 'eslint-config-appium'
Referenced from: /usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/.eslintrc
at ModuleResolver.resolve (/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/util/module-resolver.js:74:19)
at resolve (/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:515:25)
at load (/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:532:26)
at /usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:424:36
at Array.reduceRight (native)
at applyExtends (/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:408:28)
at Object.load (/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config/config-file.js:566:22)
at loadConfig (/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:63:33)
at getLocalConfig (/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:130:29)
at Config.getConfig (/usr/local/lib/node_modules/appium/node_modules/_appium-xcuitest-driver@2.30.1@appium-xcuitest-driver/WebDriverAgent/Inspector/node_modules/eslint/lib/config.js:260:26)

nore appium 1.6.6 for mac 安装教程 中提及了此贴 30 Jun 16:59

终端输入 sh ./Scripts/bootstrap.sh 提示:fatal: unable to access 'https://github.com/marekcirkos/peertalk.git/:' Could not resolve host: github.com 为什么我开着 能 却提示我无法连接

FFFFFFFFFF 回复

这个网页都打不开的😓

FFFFFFFFFF 回复

原来这个网页都打不开的

hnemma appium ios 端搭建问题 中提及了此贴 17 Jul 16:15
testly 上手 Appium-desktop beta.4 [iOS] 中提及了此贴 19 Jul 20:23

@971507252 gem install xcpretty 出错,切换目录也是,请教一下这个问题怎么解决的,按照下面的命令还是报一样的错误

@appium_test 我按照步骤安装第 13 步,其中 xcpretty 没有安装,各种尝试安装不成功,appium 没有安装,本地下载了安装包,
其他均有安装,但到 13 步骤时,wda 安装不到手机上,也无任何提示,求解

匿名 #269 · July 27, 2017

我手机上 webdriverAgent 启动了,用 iproxy 8100 8100,后。 访问电脑http://xxxxx:8100/inspector,打不开,有知道为什么的吗?我搞不明白,希望知道的能解答下,谢谢

匿名 #270 · July 27, 2017
回复

2017-05-23 09:57:09.414419+0800 XCTRunner[11010:4515926] ServerURLHere->http://99.48.97.201:8100<-ServerURLHere

目前一直卡在这里,请问该怎样解决呢?

ohmy7on 回复

bundleid 怎么查看?中间要写什么

匿名 #272 · August 07, 2017
Boxer 回复

我启动 webDriverAgent 日志到 :ServerURLHere->http://10.252.164.253:8100<-ServerURLHere 卡住了。
没有 Listening on USB 这个日志,有知道怎么回事的吗?我的重装了 2 次了没搞定
,谢谢

千万不要看见 appium 升级的窗口跳出来就点,不要问我怎么知道的😂

第 11 步不是必须, 官方说的是需要定制 wda 才需要安装,默认不需要


我在第 13 步的时候运行报错,紧急求助大佬

感谢。

把我安装过程中的一些错误纪录一下:

第七步:

JamesdeiMac:~ jameslee$ cnpm install -g ios-deploy
Downloading ios-deploy to /usr/local/lib/node_modules/ios-deploy_tmp
Copying /usr/local/lib/node_modules/ios-deploy_tmp/_ios-deploy@1.9.2@ios-deploy to /usr/local/lib/node_modules/ios-deploy
Installing ios-deploy's dependencies to /usr/local/lib/node_modules/ios-deploy/node_modules
scripts.preinstall ios-deploy@1.9.2  "./src/scripts/check_reqs.js && xcodebuild"
stderr: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

Install fail! Error: Run "sh -c ./src/scripts/check_reqs.js && xcodebuild" error, exit code 1
Error: Run "sh -c ./src/scripts/check_reqs.js && xcodebuild" error, exit code 1
    at ChildProcess.proc.on.code (/usr/local/lib/node_modules/cnpm/node_modules/runscript/index.js:74:21)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npminstall version: 3.2.1
npminstall args: /usr/local/bin/node /usr/local/lib/node_modules/cnpm/node_modules/npminstall/bin/install.js --china --userconfig=/Users/jameslee/.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=http://registry.npm.taobao.org -g ios-deploy

我的 Mac 上 xcode 和命令行工具都有, 网上 google 了一下,执行如下命令:
···
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
···

然后继续安装就成功了。

第六步出现了权限问题,按照提示执行如下脚本修复:

···
sudo chmod 777 /usr/local/lib/node_modules
···

真机启动来 wda 后,在 pc 上面 192.168.2.19:8100 无法访问,用虚拟机却可以,我看楼上好几位出现这样的问题来,也尝试使用卡在setup 的解决方案,还是如此

2017-11-27 15:15:24.231 WebDriverAgentRunner-Runner[490:127513] Continuing to run tests in the background with task ID 1
Test Suite 'All tests' started at 2017-11-27 15:15:24.966
Test Suite 'WebDriverAgentRunner.xctest' started at 2017-11-27 15:15:24.972
Test Suite 'UITestingUITests' started at 2017-11-27 15:15:24.975
Test Case '-[UITestingUITests testRunner]' started.
    t =     0.01s Start Test at 2017-11-27 15:15:24.986
    t =     0.01s Set Up
2017-11-27 15:15:24.997 WebDriverAgentRunner-Runner[490:127513] Built at Nov 27 2017 14:33:21
2017-11-27 15:15:25.043 WebDriverAgentRunner-Runner[490:127513] ServerURLHere->http://192.168.2.19:8100<-ServerURLHere

bauul [appium][Mac] ENV Setup 中提及了此贴 15 Jan 21:01
Boxer 回复

请教一下,#32 的问题是怎么解决的呀

楼主还在吗? 我在 13 步的时候 没有 listening on usb 这句... 日志卡住了

和曦 回复

真机上的解决了吗,WebDriverAgentRunner 一直闪退,那真机怎么用 inspect 呢

我也卡在这里了,你解决了么?


此处一致显示为这个,xcode10.1 和楼主截图配置菜单有很多不一样的地方,楼主能否出分最新的教程呢

执行 sh ./Scripts/bootstrap.sh 时候出现了 ERROR in ./js/app.js Module parse failed: 这个有遇到的吗?

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up