Appium自动化测试-android(安卓)

参考教程:
http://www.testclass.net/appium


Appium.exe
http://appium.io/
https://github.com/appium/appium-desktop/releases/download/v1.18.0-1/Appium-windows-1.18.0-1.exe


设置ANDROIRD-SDK环境变量
ANDROID_SDK_ROOT
参考:https://developer.android.com/studio/command-line/variables


装nodejs
npm install -g appium
appium --no-reset
appium --full-reset
通过npm install -g appium 来更新appium


安装python库Appium-Python-Client
使用py3
py27在安装的时候报错,参考:https://stackoverflow.com/questions/62064868/getting-below-error-when-i-am-installing-robot-framework-appiumlibrary
d:\Python38_32\python.exe -m pip install  Appium-Python-Client


appium client方法一览
http://www.testclass.net/appium/methods

参考命令:
查找当前显示的appActivity
.\adb.exe shell dumpsys activity activities | findstr mResumedActivity

QA
Full reset requires an app capability, use fastReset if app is not provided
使用appium --no-reset


Activity name '.SplashActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity", None, None)
1.打开要被Appium自动打开的app(有闪屏则一定要抓到闪屏)
2.使用命令查看当前活动的activity,找到包名和主activity
    .\adb.exe shell dumpsys activity activities


com.android.ddmlib.SyncException: Remote object doesn't exist
使用Appium客户端进行ui定位


参考教程:
Appium常用定位方式:https://www.jianshu.com/p/8c06f8e64d72


 

你可能感兴趣的:(杂谈)