首页 > 移动平台 > 详细

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

时间:2020-12-18 19:08:30      阅读:127      评论:0      收藏:0      [点我收藏+]

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

 

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!