开发环境搭建
- 搭建java JDK与Android SDK环境
- 下载安装nodejs
- 下载安装Appium
问题答疑
在测试中adb devices
查询无缘无故多出陌生的虚拟设备
- 同事的经验是重启电脑,莫名其妙的设备消失;
- 自我总结就是重启adb服务,
adb kill-server
,adb start-server
,也果真有效; - 关键问题是为何莫名其妙的多出个这样子的设备呢???疑惑》》》
一台电脑跑多个测试用例的问题:Error getting device property persist.sys.language: -> more than one device and emulator
一个测试用对应一个Appium服务器,一个Appium服务器对应一个 Android设备。
- 启动多个Appium服务端,appium监听不同的端口,启动appium使用–port指定监听的端口
- 每个appium服务操作不同的设备,可以在启动appium使用–udid指定设备udid,也可以在脚本capabilities字典中指定udid,在android中可以使用
adb devices
查询,与deviceName参数相同
https://testerhome.com/topics/2880
https://github.com/appium/appium/issues/5396
error: Logcat capture failed: spawn adb.exe ENOENT
- 各种回答是android sdk路径包含空格,各种检查,莫有空格啊,哎http://www.tuicool.com/articles/eA7Zni
- 灵感来源于此https://testerhome.com/topics/2024,发现将ANDROID_HOME环境变量设置成了ANDROID_SDK_HOME环境变量了,果断解决了问题。
在含有Emoji特殊符号的页面中,爆出Failed to Dump Window Hierarchy
https://github.com/appium/appium/issues/4151
http://blog.csdn.net/soslinken/article/details/50126477
won’t be solved until the new android driver is completed. This is a known bug in uiautomator v1
此问题是uiautomator自身bug,换用Android5.1以上的系统
参考:
- appium踩过的坑(持续更新…)