温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Appium命令笔记之一

发布时间:2020-08-05 20:14:53 来源:网络 阅读:529 作者:知止内明 栏目:软件技术

    查看APK包名与其他信息命令:

aapt l <你的apk文件>,这个命令就是查看apk内容


下面详细说下 aapt dump 这个查询命令

基本格式为   aapt dump [] <apk文件>

这里[ ]选择可以有以下几种:

badging              Print the label and icon for the app declared in APK
permissions      Print the permissions from the APK.
resources           Print the resource table from the APK.
configurations   Print the configurations in the APK.
xmltree              Print the compiled xmls in the given assets.
xmlstrings         Print the strings of the given compiled xml assets.


例如:

C:\Users\lw>aapt d badging Desktop\zhihu.apk |findstr "package launchable-activity"

package: name='com.zhihu.android' versionCode='507' versionName='4.54.1' platformBuildVersionName='7.1.1'

launchable-activity: name='com.zhihu.android.app.ui.activity.MainActivity'  label='鐭ヤ箮' icon=''


//启动另外一个APP

public void startapp()

{

//启动该apt

driver.startActivity("com.zhihu.android","'com.zhihu.android.app.ui.activity.MainActivity");

}


使用场景:

1、用例之前的切换

2、场景切换使用

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI