2024-08-05 17:41:17 +08:00
|
|
|
### 项目依赖安装
|
|
|
|
```shell
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
### requirements.txt
|
|
|
|
```shell
|
|
|
|
pip install pipreqs
|
|
|
|
pipreqs ./ --encoding=utf8
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2024-08-01 21:07:17 +08:00
|
|
|
### 使用 uiautomator2 通过 adb 连接安卓设备
|
|
|
|
|
|
|
|
uiautomator2 是基于 uiautomator 的 Python 封装,可以用来对安卓设备进行自动化测试。
|
2024-08-01 21:58:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
### 可视化辅助工具 (选其中一个安装即可)
|
|
|
|
|
|
|
|
#### uiautodev
|
|
|
|
##### 安装
|
|
|
|
```shell
|
|
|
|
pip3 install -U uiautodev
|
|
|
|
```
|
|
|
|
|
|
|
|
##### 运行
|
|
|
|
```shell
|
|
|
|
uiauto.dev
|
|
|
|
```
|
|
|
|
或
|
|
|
|
```shell
|
|
|
|
python3 -m uiautodev
|
|
|
|
```
|
|
|
|
|
|
|
|
#### weditor
|
|
|
|
##### 安装
|
|
|
|
```shell
|
|
|
|
git clone https://github.com/openatx/weditor
|
|
|
|
pip3 install -e weditor
|
|
|
|
```
|
|
|
|
|
|
|
|
##### 运行
|
|
|
|
```shell
|
|
|
|
weditor
|
|
|
|
```
|
|
|
|
|