自动化测试框架

2020-01-12  本文已影响0人  修符道人

https://blog.csdn.net/maetelibom/article/details/51557941

1.openatx/uiautomator2

关于uiautomator2的集成,千万要去官网,否则会各种问题频出。(去官网下载工具、资料、看文档是程序员良好的习惯。)
https://github.com/openatx/uiautomator2

环境配置

包括python、pip

注意uiautomator2官方安装教程第一步,我集成时uiautomator2会自动去安装Pillow工具,版本是Pillow 7.0.0。


image.png

如果python版本和Pillow支持的版本对应不上,命令行可能会报错,将命令行粘贴到文本编辑器里仔细分析,能发现这个错误:

C:\Users\Administrator\AppData\Local\Temp\pip-install-bd868qj9\Pillow\setup.py:42: RuntimeWarning:
 Pillow 7.0.0 does not support Python 3.9 and does not provide prebuilt Windows binaries.
We do not recommend building from source on Windows

去Pillow官网查看对应Python版本
https://pillow.readthedocs.io/en/stable/installation.html

image.png
我选择的python版本是3.6
去python官网下载python
https://www.python.org/downloads/windows/
我选择的是3.6的第一个版本:Python 3.6.0a2 - June 13, 2016

安装python记得勾选add python.exe to path的选项,否则命令行不识别python。

pip是python的一个下载工具,方便从网络上install各种库。
官方安装
https://pip.pypa.io/en/stable/installing/
卸载pip
https://www.cnblogs.com/burz/p/9099281.html

开始集成uiautomator2

严格参照github上的Install教程执行即可

uiautomator2使用

可视化调试工具weditor

https://blog.csdn.net/xgh1951/article/details/97241656
简直是反编译的得力助手

1.weditor配置

pip install -U weditor==0.1.0

问题解决,但0.1.0版本相比于0.4.2少了设备connect的模板代码。

2.weditor具体使用

上一篇 下一篇

猜你喜欢

热点阅读