APP自动化测试内嵌H5三种处理方式(基于python)

1、怎么判断APP是否有内嵌H5

使用appium的检查器对source中class进行查看,是否为 "android.webkit.WebView",如图

APP自动化测试内嵌H5三种处理方式(基于python)

 

2、ADB命令

前提:设备需开启开发者模式,并授权允许开启调试模式。(建议使用虚拟机,屏幕大小固定不变。)

2.1、引用第三方库及常用操作

import os

os.system(‘adb shell input tap x y‘)  # 触控点击

os.system(‘adb shell input text 123456789‘)  # 输入文本

os.system(‘adb shell input keyevent KEYCODE_TAB‘)  # 按键操作

os.system(‘adb shell input swipe 1000 1000 100 1000‘)  # 滑动操作

os.sysytem(‘adb shell input keyevent KEYCODE_DEL‘)  # 逐个删除

3、内嵌H5的webview开启debug模式

QQ

 

APP自动化测试内嵌H5三种处理方式(基于python)

上一篇:statsmodels.tsa.seasonal.seasonal_decompose使用移动平均线进行季节性分解


下一篇:Android手机app帧率测试