美文网首页
MacOs下WEditor在线编辑脚本实践(持续更新)

MacOs下WEditor在线编辑脚本实践(持续更新)

作者: 智能智控 | 来源:发表于2021-03-15 20:10 被阅读0次

    先上配置完成后的预览图:

    运行预览图

    环境配置(MacOs) 

    各种库的版本号

    uiautomator2         v2.13.2

    atx-agent                v0.9.6

    android-uiautomator-server     v2.3.2

    adbutils                  v0.9.1

    requests                 v2.25.1

    lxml                         v4.6.2

    1.安装uiautomator2

    #由于uiautomator2仍在开发中,建议添加—pre来安装开发版本

    pip install --upgrade --pre uiautomator2

    #或者你可以直接从github源代码安装

    git clone https://github.com/openatx/uiautomator2 

    pip install -e uiautomator2

    测试是否安装成功 uiautomator2 --help

    2.安装weditor (UI查看器)

    因为uiautomator是独占资源,所以当atx运行的时候uiautomatorviewer是不能用的,为了减少atx频繁的启停,我们开发了基于浏览器技术的weditor UI查看器。https://github.com/openatx/weditor

    安装方法(备注: 目前最新的稳定版为 0.1.0)

    pip install -U weditor

    安装好之后,就可以在命令行运行weditor --help 确认是否安装成功了。

    Windows系统可以使用命令在桌面创建一个快捷方式 weditor --shortcut

    命令行直接输入 weditor 会自动打开浏览器,输入设备的ip或者序列号,点击Connect即可。

    3.安装设备的守护进程(可选)

    电脑连接上一个手机或多个手机, 确保adb已经添加到环境变量中,执行下面的命令会自动安装本库所需要的设备端程序:uiautomator-server 、atx-agentopenstf/minicapopenstf/minitouch

    #init 所有的已经连接到电脑的设备

    python -m uiautomator2 init

    安装提示success即可

    相关文章

      网友评论

          本文标题:MacOs下WEditor在线编辑脚本实践(持续更新)

          本文链接:https://www.haomeiwen.com/subject/bqgkcltx.html