Awesome-omni-skill android_ui_verification
Automated end-to-end UI testing and verification on an Android Emulator using ADB.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/design/android_ui_verification" ~/.claude/skills/diegosouzapw-awesome-omni-skill-android-ui-verification && rm -rf "$T"
manifest:
skills/design/android_ui_verification/SKILL.mdsource content
Android UI Verification Skill
This skill provides a systematic approach to testing React Native applications on an Android emulator using ADB commands. It allows for autonomous interaction, state verification, and visual regression checking.
When to Use
- Verifying UI changes in React Native or Native Android apps.
- Autonomous debugging of layout issues or interaction bugs.
- Ensuring feature functionality when manual testing is too slow.
- Capturing automated screenshots for PR documentation.
🛠 Prerequisites
- Android Emulator running.
installed and in PATH.adb- Application in debug mode for logcat access.
🚀 Workflow
1. Device Calibration
Before interacting, always verify the screen resolution to ensure tap coordinates are accurate.
adb shell wm size
Note: Layouts are often scaled. Use the physical size returned as the base for coordinate calculations.
2. UI Inspection (State Discovery)
Use the
uiautomator dump to find the exact bounds of UI elements (buttons, inputs).
adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml ./artifacts/view.xml
Search the
view.xml for text, content-desc, or resource-id. The bounds attribute [x1,y1][x2,y2] defines the clickable area.
3. Interaction Commands
- Tap:
(Use the center of the element bounds).adb shell input tap <x> <y> - Swipe:
(Used for scrolling).adb shell input swipe <x1> <y1> <x2> <y2> <duration_ms> - Text Input:
(Note: Limited support for special characters).adb shell input text "<message>" - Key Events:
(e.g., 66 for Enter).adb shell input keyevent <code_id>
4. Verification & Reporting
Visual Verification
Capture a screenshot after interaction to confirm UI changes.
adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png ./artifacts/test_result.png
Analytical Verification
Monitor the JS console logs in real-time to detect errors or log successes.
adb logcat -d | grep "ReactNativeJS" | tail -n 20
Cleanup
Always store generated files in the
artifacts/ folder to satisfy project organization rules.
💡 Best Practices
- Wait for Animations: Always add a short sleep (e.g., 1-2s) between interaction and verification.
- Center Taps: Calculate the arithmetic mean of
for the most reliable tap target.[x1,y1][x2,y2] - Log Markers: Use distinct log messages in the code (e.g.,
) to make✅ Action Successful
verification easy.grep - Fail Fast: If a
fails or doesn't find the expected text, stop and troubleshoot rather than blind-tapping.uiautomator dump