首页 > 其他分享 >atx-agent学习(3)-安装uiautomator apk

atx-agent学习(3)-安装uiautomator apk

时间:2023-07-02 11:33:13浏览次数:45  
标签:shell uiautomator self agent apk github pm

源码如下:

def _install_uiautomator_apks(self):
        """ use uiautomator 2.0 to run uiautomator test
        通常在连接USB数据线的情况下调用
        """
        self.shell("pm", "uninstall", "com.github.uiautomator")
        self.shell("pm", "uninstall", "com.github.uiautomator.test")
        for filename, url in app_uiautomator_apk_urls():
            path = self.push_url(url, mode=0o644)
            self.shell("pm", "install", "-r", "-t", path)
            self.logger.info("- %s installed", filename)

其中self.shell("pm", "uninstall", "com.github.uiautomator")表示卸载一个应用.
self.shell("pm", "install", "-r", "-t", path)表示安装一个应用, -r表示重新安装, -t表示允许安装测试应用.

标签:shell,uiautomator,self,agent,apk,github,pm
From: https://www.cnblogs.com/huzhongqiang/p/17520521.html

相关文章

  • atx-agent学习(2)-安装minitouch的过程
    minitouch是帮助模拟手机触摸的工具,atx-agent不安装它也可以.首先,确定minitouch的下载地址,如下面地址所示:'https://github.com/openatx/stf-binaries/raw/0.3.0/node_modules/@devicefarmer/minitouch-prebuilt/prebuilt/arm64-v8a/bin/minitouch'不过这里面arm64-v8a......
  • atx-agent学习(1)-怎么判断是否安装了atx-agent
    atx-agent是运行在手机上的一个代理程序,可以通过网络进行手机测试,项目地址:https://github.com/openatx/atx-agent通过阅读uiautomator2源码,搞明白了判断的过程,有如下心得:安装adbutils库,建立Device对象,下面的代码可以获取atx_agent可执行文件是否存在atx_agent......
  • ADB Fastboot++ 在口袋阅中安装apk
    首先下载和安装ADBFastboot++在安装目录中右键用windowspowershell打开连接设备输入命令adbdevices,查看设备是否被检测到输入命令adbinstall软件地址进行安装(注意软件名不能有空格,可以通过修改软件名顺利安装)......
  • Python的手机测试工具uiautomator2库的实现原理
    使用python通过调试模式测试安卓手机APP,使用uiautomator2库是比较方便的,这个库的源码网址是:https://github.com/openatx/uiautomator2通过阅读源码,大概搞明白了其实现原理,它是通过调用adbutils库,获取UI的hierarchydump数据,然后检索对应的UI节点,计算此节点的UI区......
  • Mac反编译安卓APK
    热烈欢迎,请直接点击!!!进入博主AppStore主页,下载使用各个作品!!!注:博主将坚持每月上线一个新app!!一、方法一:1、安装jdk8brewinstall--caskadoptopenjdk82、下载库,编译安装gitclonehttps://github.com/skylot/jadx.gitcdjadx./gradlewdist3、然后将build/jadx/......
  • git提交由于粗心大意漏掉了apk
    出现这样低级的错误,真的是愧疚万分,莫名起名的缺少了最重要的apk,并且是两笔提交都犯了同样的错误,不再去想原因了,肯定是人为失误。补充一下后续的措施,避免出现这样的错误。提交之后目视检查gitpush之后需要去gerrit查看提交的产物是否完整......
  • Scrapy_下载中间件设置UserAgent
    Scrapy中Downloader设置UA下载中间件是Scrapy请求/响应处理的钩子框架。这是一个轻、低层次的应用。通过可下载中间件,可以处理请求之前和请求之后的数据。如果使用下载中间件需要在Scrapy中的setting.py的配置DOWNLOADER_MIDDLEWARES才可以使用,比如:DOWNLOADER_MIDDLEWARE......
  • 不能成功配置ssh信任,提示Agent admitted failure to sign using the key.
    不能成功配置ssh信任,提示Agentadmittedfailuretosignusingthekey.问题现象:   做完信任之后要需要输密码:[[email protected]]$sshdb02Agentadmittedfailuretosignusingthekey.grid@db02'spassword:原因:   GNOME用户会在尝试通过SSH连接到GCE时......
  • zabbix(2-server-agent)
    注意:以下步骤都是在LAMP配置之后进行的。关于LAMP环境的简单快速搭建,见博客:http://afterdawn.blog.51cto.com/7503144/1923139下面开始介绍在CentOS7上安装部署Zabbix3.0版本及快速进行基本配置,本次案例要用到两台主机,一台作为zabbix_server端,一台作为zabbix_agent端,具体信息如下:za......
  • orchestrator 中的 agent
    目录orchestrator-agent参考Orchestrator是一个开源的MySQL高可用性解决方案,它可以自动化执行MySQL故障转移、主从切换、数据中心迁移等操作,同时提供了一个Web界面和API接口,方便运维人员进行MySQL集群管理和监控。在Orchestrator常用功能中,很少提及agent,实际上,Orchestrator也......