溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Appium命令筆記之一

發(fā)布時(shí)間:2020-08-05 20:14:53 來源:網(wǎng)絡(luò) 閱讀:570 作者:知止內(nèi)明 欄目:軟件技術(shù)

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

aapt l <你的apk文件>,這個(gè)命令就是查看apk內(nèi)容


下面詳細(xì)說下 aapt dump 這個(gè)查詢命令

基本格式為   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=''


//啟動(dòng)另外一個(gè)APP

public void startapp()

{

//啟動(dòng)該apt

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

}


使用場景:

1、用例之前的切換

2、場景切換使用

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI