fetch failed == 获取失败。检查网络或者换个 npmrc
#7 楼 @shootingstar Activity 里面有空格!?好吧,刚刚再看了一下 log,发现确实有空格:
"appActivity":".home.CtripSplashActivity ",
看样子我还不够仔细。。。学习了。
麻烦把解决方案放到帖子内容中,并把帖子标题改为已解决,方便后面其他遇到相同错误的人。
检查一下 ANDROID_HOME 这个环境变量。新手常见错误,多加了分号(分号是不同路径间间隔用的,你只有一个路径不需要用分号间隔)
#2 楼 @seveniruby 好办法!
log 等级和 log 记录到哪个文件都是可以配置的。命令行关于 log 的参数配置:
-g LOG, --log LOG Also send log output to this file
--log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}
log level; default (console[:file]): debug[:debug]
--log-timestamp Show timestamps in console output
--log-no-colors Don't use colors in console output
--show-sim-log (IOS-only) if set, the iOS simulator log will be
written to the console
--show-ios-log (IOS-only) if set, the iOS system log will be written
to the console
--debug-log-spacing Add exaggerated spacing in logs to help with visual
inspection
用图形化界面的看看各个设置页面,里面有的。
#17 楼 @mildshark 不客气,其实我没帮到多少……
mark 下解决方案了,下次如果我要用就试试把 wait 设成 500。
#5 楼 @careysucci 那我就不大清楚了。根据你的 log 只能帮到这里了,不知道其他具体情况也很难准确定位。
建议你去 google/stackoverflow 看一下吧。百度在这些方面搜不出什么有价值的东西。
#4 楼 @cissysnail crash 和 anr 产生原因都来自于应用代码本身。crash 有可能是出现了某个非未处理的异常,anr 是某个部分占用 ui 线程太久了或性能有问题。
别只看 monkey 的 log,logcat 的 log 才能帮你定位到具体代码。必要时甚至需要 trace。
代码块不要用引用格式……有代码块的格式的,请看页面底部的 markdown 说明。
你删了还得再编译个 jar 文件给它啊。
话说你那个帖子是 1.0.0 的了,现在不一定适用了。
木有权限?貌似 appium 是用类似外部启动的方法来启动你指定的 activity 的。
那你试试不指定 activity 来启动?
两个 activity 都有 log 吗?
你可以用 logcat 看看到底起来的是哪个 activity。我从 appium 的 log 看到就是起来的不是.activity.login.WelcomeActivity
,而且 appium 等待了一段时间后这个 activity 还是没起来,所以才会报错。
#2 楼 @wangcityboy 哦,明白了。
#45 楼 @james88233 appium 既可以测 iOS,也能测 android 的啊。测这两个平台除了一些设置参数不一样大部分一样的。
python 简单是相对于 java,C 而言的。无论学什么,多练都是必须的。如果它简单到一两天就能熟练使用,那么它能做的事情会变得很有限。
入门 python 推荐看看《a byte of python》,网上有免费 pdf
赞!!
个人建议,个人学习记录还是放回你自己博客吧。后面你可以放个链接过来 testerhome。
按照你的发帖速度,我怕会搞到首页大部分帖子都是你的帖子。
你确定.activity.login.WelcomeActivity
是 launcher?
从 log 来看,启动的 activity 是.activity.login.VerifyActivity
,不是.activity.login.WelcomeActivity
。
我猜测.activity.login.WelcomeActivity
是启动引导页,只有首次安装才会出现。
这 log 的长度太。。。
我提取一下关键 log:
2015-03-30 09:36:44:772 - info: [IOS_SYSLOG_ROW ] Mar 30 02:36:44 CareydeMac.local /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/libexec/lsd[10968]: LaunchServices: Failed to set the data protection class for /Users/carey/Library/Developer/CoreSimulator/Devices/117A2222-200A-4899-B449-59A79E4E3CE2/data/tmp/com.apple.IconsCache/com.yy.enterprise.yyvoice_CFBundleIcon[15]
2015-03-30 09:36:45:029 - info: [IOS_SYSLOG_ROW ] Mar 30 02:36:45 CareydeMac.local mediaremoted[10945]: Property list invalid for format: 200 (property lists cannot contain NULL)
2015-03-30 09:36:45:077 - info: [IOS_SYSLOG_ROW ] Mar 30 02:36:45 CareydeMac com.apple.CoreSimulator.SimDevice.117A2222-200A-4899-B449-59A79E4E3CE2.launchd_sim[10938] (UIKitApplication:com.yy.enterprise.yyvoice[0x65ae][10983]): Program specified by service does not contain one of the requested architectures: �\�
2015-03-30 09:36:45:085 - info: [IOS_SYSLOG_ROW ] Mar 30 02:36:45 CareydeMac.local SpringBoard[10951]: Unable to get pid for 'UIKitApplication:com.yy.enterprise.yyvoice[0x65ae]': No such process (err 3)
2015-03-30 09:36:45:092 - info: [IOS_SYSLOG_ROW ] Mar 30 02:36:45 CareydeMac.local SpringBoard[10951]: Unable to delete job with label UIKitApplication:com.yy.enterprise.yyvoice[0x65ae]. Error: Operation now in progress
2015-03-30 09:36:45:092 - info: [IOS_SYSLOG_ROW ] Mar 30 02:36:45 CareydeMac.local SpringBoard[10951]: Application 'UIKitApplication:com.yy.enterprise.yyvoice[0x65ae]' exited for an unknown reason.
2015-03-30 09:36:45:108 - info: [IOS_SYSLOG_ROW ] Mar 30 02:36:45 CareydeMac com.apple.CoreSimulator.SimDevice.117A2222-200A-4899-B449-59A79E4E3CE2.launchd_sim[10938] (UIKitApplication:com.yy.enterprise.yyvoice[0x65ae][10983]): Trampoline was terminated before jumping to service: Killed: 9
根据Program specified by service does not contain one of the requested architectures
找到https://discuss.appium.io/t/appium-v1-3-0-beta1-xcode-6-1-failed-looking-up-pid-of-launched-process/1015
你按照里面的解决方法试试?
找到这个:
https://discuss.appium.io/t/error-waited-20-secs-for-selendroid-server-and-it-never-showed-up/722/12
应该不是 appium 的问题,是 selendroid 的问题。改一下 selendroid 版本吧。
有点奇怪啊,怎么两个都有App is installed!
这个 log?
google 了一下,貌似是ios-deploy
的问题:
https://github.com/phonegap/ios-deploy/issues/11
好文,继续加油!
PS:ll
是一个 alias,它实际执行的就是ls -l
。不过不是每个系统都默认加了这个 alias 的。
你有试过单独用 selendroid 来测吗?
你参考的链接里面的内容貌似已经很旧了(appium 1.2.x 的了)
#3 楼 @weamylady 有点类似。fake server 可以看做是一个挡板。