安装Python和 uiautomator2 库
pip install –pre uiautomator2
pip install pillow
安装Mumu模拟器,从问题诊断菜单获取adb端口
![](https://www.fpsv.com/wp-content/uploads/2024/06/image-480x192.png)
下载https://dl.google.com/android/repository/platform-tools_r29.0.5-windows.zip,将压缩包里的adb.exe替换Mumu模拟器安装目录的子目录shell下的adb.exe
进入cmd窗口,运行adb connect 127.0.0.1:16384
![](https://www.fpsv.com/wp-content/uploads/2024/06/image-1-480x89.png)
接着运行:python -m uiautomator2 init 在模拟器中安装atx agent
![](https://www.fpsv.com/wp-content/uploads/2024/06/image-2-480x110.png)
![](https://www.fpsv.com/wp-content/uploads/2024/06/image-3-480x605.png)
pip安装weditor,注意 要降低版本安装:0.7.3不可以,0.6.4可以
![](https://www.fpsv.com/wp-content/uploads/2024/06/image-4-480x82.png)
然后运行:python -m weditor
![](https://www.fpsv.com/wp-content/uploads/2024/06/image-5-480x112.png)
可以看到自动在浏览器启动了MuMu模拟器界面
![](https://www.fpsv.com/wp-content/uploads/2024/06/image-6-480x236.png)
发表评论