>adb shell dumpsys window | findstr mCurrentFocus
adb devices
# 实例化字典
desired_caps = dict()
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '9'
# devices
desired_caps['deviceName'] = 'emulator-5554'
# 包名
desired_caps['appPackage'] = 'com.android.settings'
# 应用名字
desired_caps['appActivity'] = '.Settings'
Appium-Python-Client安装换源
阿里云:pip install -i https://mirrors.aliyun.com/pypi/simple/ Appium-Python-Client
清华:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple Appium-Python-Client
需要配置好环境jdk等
appium driver install xcuitest appium driver install uiautomator2
npm install --global appium --drivers=xcuitest,uiautomator2
import time
from appium.options.android import UiAutomator2Options
from ap