Android自动化功能-使用Appium获取android页面节点元素信息

一、appium安装和使用

官方网站:https://appium.io/docs/en/latest/

github地址:https://github.com/appium/appium

安装步骤:

  1. 首先需要安装node.js

  2. 安装好node.js之后使用npm安装 appium

    复制代码
    npm install -g appium
    appium -v # 检查安装版本
  3. appium直接安装uiautomator2

    复制代码
    appium driver install uiautomator2
  4. 命令行中启动 Appium

    复制代码
    appium server --allow-cors
  5. 打开Appium Inspector软件,输入启动参数:

    复制代码
    {
      "platformName": "Android",
      "appium:deviceName": "Android  Device",
      "appium:automationName": "UiAutomator2"
    }

成功启动后,如下图就可以获取节点元素信息了

二、android无障碍服务自动化框架

https://github.com/ven-coder/Assists

使用方法github上有教程

相关推荐
鸿蒙布道师3 小时前
鸿蒙NEXT开发动画案例5
android·ios·华为·harmonyos·鸿蒙系统·arkui·huawei
孙克旭_6 小时前
PXE_Kickstart_无人值守自动化安装系统
linux·运维·自动化
2301_787552877 小时前
console-chat-gpt开源程序是用于 AI Chat API 的 Python CLI
人工智能·python·gpt·开源·自动化
橙子199110168 小时前
在 Kotlin 中什么是委托属性,简要说说其使用场景和原理
android·开发语言·kotlin
androidwork8 小时前
Kotlin Android LeakCanary内存泄漏检测实战
android·开发语言·kotlin
笨鸭先游9 小时前
Android Studio的jks文件
android·ide·android studio
gys98959 小时前
android studio开发aar插件,并用uniapp开发APP使用这个aar
android·uni-app·android studio
H309199 小时前
vue3+dhtmlx-gantt实现甘特图展示
android·javascript·甘特图
像风一样自由9 小时前
【001】renPy android端启动流程分析
android·gitee
千里马学框架11 小时前
重学安卓14/15自由窗口freeform企业实战bug-学员作业
android·framework·bug·systrace·安卓framework开发·安卓窗口系统·自由窗口