uiautomator2自动化测试

必备(python/安卓sdk/安卓手机或者安卓模拟器)

1、pip install --pre -U uiautomator2

2、python -m uiautomator2 init

3、pip install --pre weditor

4、python -m weditor

两种连接方式

一种usb连接 (adb devices获取)

import uiautomator2 as u2
d = u2.connect_usb('设备号')

一种WIFI连接(电脑可以ping通手机ip)

import uiautomator2 as u2
d = u2.connect('ip')

猜你喜欢

转载自www.cnblogs.com/liang11092/p/11288875.html