常见问题
- 起步: Getting Started - Appium
- 获取应用信息:android - How to view AndroidManifest.xml from APK file? - Stack Overflow
bash
aapt dump badging my.apk
- 检查元素:使用 appium-desktop appium/appium-desktop: Appium Server and Inspector in Desktop GUIs for Mac, Windows, and Linux
- 不重置设置应用:
'noReset' : True'
js
const opts = {
: 4723,
port: {
capabilities: "Android",
platformName: "cancro_wc_lte",
deviceName: "com.tencent.mm",
appPackage: ".ui.LauncherUI",
appActivity: "UiAutomator2",
automationName// 加上这个
: true
noReset
}
};
- 等待元素出现:Implicit Wait - Appium
js
// webdriver.io example
driver.setImplicitTimeout(5000)
-
adb 链接夜神模拟器:
adb.exe connect 127.0.0.1:62001
-
adb 安装 APP:
adb.exe install <app name.apk>
-
Android Studio 中的安卓模拟器无法装微信:
架构问题将
x86
模拟器换成arm
的就可以了(理论上可以,但arm
的模拟器在我的电脑上未响应)。使用模拟器坑太多,推荐使用真机。android - INSTALL_FAILED_NO_MATCHING_ABIS when install apk - Stack Overflow
android - The APK failed to install. Error: Could not parse error string - Stack Overflow