返回顶部
m

mobile-appium-test

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
536
下载量
0
收藏
概述
安装方式
版本历史

mobile-appium-test

# Mobile Appium Test Android UI automation testing using Appium with USB-connected real devices. ## Prerequisites **Required tools (must be installed):** - ADB (Android Debug Bridge) - part of Android SDK - Appium Server (v2.x recommended) - Appium Doctor (`npm install -g @appium/doctor`) **Verify installation:** ```bash adb version appium --version appium doctor ``` ## Quick Reference ### Device Connection | Goal | Command | |------|---------| | List connected devices | `adb devices` | | Get device info | `adb shell getprop ro.build.version.release` | | Restart ADB server | `adb kill-server && adb start-server` | | USB debug authorization | Check phone for authorization prompt | ### Appium Server | Goal | Command | |------|---------| | Start Appium | `appium --address 127.0.0.1 --port 4723` | | Start with relaxed security | `appium --relaxed-security` | | Check Appium status | `curl http://127.0.0.1:4723/status` | ### Common Appium Operations | Goal | Endpoint/Action | |------|-----------------| | Start session | `POST /session` with capabilities | | Find element | `POST /session/{id}/element` | | Click element | `POST /session/{id}/element/{id}/click` | | Send keys | `POST /session/{id}/element/{id}/value` | | Take screenshot | `GET /session/{id}/screenshot` | | Get page source | `GET /session/{id}/source` | | Quit session | `DELETE /session/{id}` | ## Typical Workflow ### 1. Verify Device Connection ```bash adb devices ``` Ensure device shows `device` status (not `unauthorized` or `offline`). ### 2. Start Appium Server ```bash appium --address 127.0.0.1 --port 4723 --relaxed-security ``` ### 3. Run Test Use desired capabilities for USB device: ```json { "platformName": "Android", "deviceName": "device", "udid": "<device-udid>", "app": "/path/to/app.apk", "automationName": "UiAutomator2", "noReset": true } ``` ### 4. Common Test Scenarios - **Install app**: `adb install app.apk` - **Launch app**: Appium `appActivity` capability - **Find element by ID**: `find_element("id", "com.example:id/button")` - **Find element by text**: `find_element("xpath", "//*[@text='Submit']")` - **Swipe**: Appium touch action - **Get logs**: `adb logcat` ## Error Handling | Error | Cause | Solution | |-------|-------|----------| | `device not found` | USB connection issue | Check `adb devices`, restart ADB server | | `unauthorized` | USB debug not authorized | Unlock phone, authorize the computer | | `no such element` | Element not found | Use `find_elements` with wait, check page source | | `session not created` | Capability mismatch | Verify UDID, platform version, app path | ## Notes - Always use `UdID` from `adb devices` for real device testing - Use `UiAutomator2` as automation engine for Android - `noReset: true` preserves app state between sessions - For WiFi debugging: `adb tcpip 5555` then `adb connect <IP>:5555`

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mobile-appium-test-1776295882 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mobile-appium-test-1776295882 技能

通过命令行安装

skillhub install mobile-appium-test-1776295882

下载 Zip 包

⬇ 下载 mobile-appium-test v1.0.0

文件大小: 2.09 KB | 发布时间: 2026-4-16 18:39

v1.0.0 最新 2026-4-16 18:39
Initial release of mobile-appium-test.

- Provides a reference for automating UI tests on USB-connected Android devices using Appium.
- Includes device connection verification, app installation, UI element operations, test execution, screenshot capture, and log collection.
- Lists required tools (ADB and Appium Server) and basic installation checks.
- Details typical workflow, common Appium commands, and troubleshooting steps.
- Supports tests with custom capabilities and provides guidance for error handling.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部