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

时间:2020-12-18 19:08:30   收藏:0   阅读:129

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

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

技术分享图片

 

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

 

原文:https://www.cnblogs.com/guobaozhu/p/14155939.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!