使用uiautomator2进行webview页面的测试
1.开发开启webview debug模式
2.使用VirtualXposed框架进行webview测试,详细见https://testerhome.com/topics/16156
下载,安装VirtualXposed
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,就可以运行成功