使用uiautomator2进行webview页面的测试


1.开发开启webview debug模式
2.使用VirtualXposed框架进行webview测试,详细见https://testerhome.com/topics/16156
下载,安装VirtualXposed

```#python import time import uiautomator2 as u2

d = u2.connect("192.168.0.169")
d.app_start("io.va.exposed",stop='True')
time.sleep(3)
d.swipe(0.5,0.8,0.5,0.3)
d(text="浙江预约挂号").click()
time.sleep(10)
d.xpath("//android.widget.TextView[@text='专家咨询']").click()
d.xpath("//android.widget.TextView[@text='陈诚']").click()
time.sleep(5)
d.swipe(0.5,0.8,0.5,0.2)
d(className="android.view.View",textContains="个问题").click()

问题:
1.在VirtualXposed中,并未用到selenium,就可以运行成功


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM