定向班第一期_android 测试技术答疑_20190117

Android知识点梳理

adb shell uiautomator dump
adb shell cat /sdcard/window_dump.xml
adb shell dumpsys activity top

adb shell input text 123
adb shell input swipe 200 200  500 500 1000

uiautomator2

等待

  • 显式等待本质就是每0.5s检查下你给的条件是否满足
  • 隐式等待与显式等待本质是一直的,一个是默认等待的时间,一个是自定义的时间

adb架构

  • adb client adb shell echo xxxx
  • adb server: adb -L tcp:5037 fork-server server --reply-fd 4
  • adbd: adb shell ps | grep adbd

adb命令替换来解决命令分析

echo "# $$ "$(date "+%Y/%m/%d %H:%M:%S") >> /tmp/adb.log
echo "# ppid: $(ps -o command  $(ps -o ppid $$ | tail -1) | tail -1)" >> /tmp/adb.log
echo "adb $@" >> /tmp/adb.log
exec /Users/seveniruby/Library/Android/sdk//platform-tools/adb.bak "$@"

Android技术点答疑

实战作业review

关闭