Using Claude to Automate Mobile App QA with Capacitor WebViews

A developer documented how they taught Claude to perform automated quality assurance for a mobile app built with Capacitor. The app uses React wrapped in native shells (WebView on Android, WKWebView on iOS) with server-driven UI architecture, allowing one codebase to run on web, iOS, and Android platforms.
Testing Challenge and Solution
Capacitor apps exist in a testing gap: Playwright can't access the native shell, while XCTest and Espresso can't interact with HTML inside WebViews. The developer created a Python script that uses Claude to drive both mobile platforms, take screenshots, analyze them for issues, and file bug reports automatically.
Android Implementation Details
Android setup took 90 minutes. Key steps:
- Connectivity fix:
adb reverse tcp:3000 tcp:3000andadb reverse tcp:8080 tcp:8080(needs re-running after emulator restart) - WebView DevTools access: Find socket with
adb shell "cat /proc/net/unix" | grep webview_devtools_remote - Forward to local port:
adb forward tcp:9223 localabstract:$WV_SOCKET - Full Chrome DevTools Protocol access via
curl http://localhost:9223/json
The script sweeps all 25 app screens in about 90 seconds using CDP for navigation and authentication (injecting JWT into localStorage) and adb shell screencap for screenshots.
Analysis and Bug Reporting
Screenshots are analyzed for visual issues: broken layouts, error messages, missing images, blank screens, and status bar overlap. When issues are found, the system:
- Authenticates as zabriskie_bot
- Uploads screenshots to S3
- Files bug reports to the production forum with format:
[Android QA] Shows Hub: RSVP button overlaps venue text
The system knows expected states: "Forbidden" responses for non-members on crew pages aren't bugs, empty avatar circles aren't bugs, and "Preview" text in profile settings is a known cosmetic issue.
iOS Implementation
iOS setup took over six hours, highlighting differences in mobile automation tooling. The article notes this contrast but provides fewer specific technical details about the iOS implementation compared to Android.
Deployment
The entire QA system runs as a scheduled task every morning at 8:47 AM.
📖 Read the full source: HN AI Agents
👀 See Also

Hollow AgentOS Reduces Claude Code Token Usage by 68.5% with JSON-Native OS Approach
Hollow AgentOS, a JSON-native operating system layer for AI agents, reduces Claude Code token usage by 68.5% by eliminating wasteful shell command overhead. The tool plugs into Claude Code via MCP and runs local inference through Ollama.

SymDex: Open-Source MCP Code Indexer Reduces AI Agent Token Usage
SymDex is an open-source MCP code indexer that pre-indexes codebases to help AI coding agents find functions and classes without reading entire files, reducing token usage by approximately 97% per lookup according to the developer's benchmarks.

Godogen: Claude Code Skills for Complete Godot Game Generation
Godogen is an open-source pipeline that uses Claude Code skills to generate complete, playable Godot 4 projects from text prompts. It handles architecture design, 2D/3D asset generation, GDScript writing, and visual QA testing, addressing specific engineering bottlenecks like GDScript training data scarcity and build-time vs runtime state issues.

ProofShot CLI Gives AI Coding Agents Browser Verification Capabilities
ProofShot is an open-source CLI tool that lets AI coding agents verify UI features by recording browser sessions, capturing screenshots, and collecting console errors. It works with any agent that can run shell commands and generates self-contained HTML reports for human review.