cross-app-tests-with-uiautomator
CommunityDrive Settings and other apps from tests.
Software Engineering#uiautomator#android instrumentation#cross-app testing#system ui#staleobjectexception#uidevice#byselector
Authorskydoves
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill solves the challenge of reliably driving cross-process Android UI flows—like Settings, system notifications, and another app’s screens—from instrumentation tests when Espresso can’t interact across foreign windows.
Core Features & Use Cases
- Cross-app/system UI control with UiAutomator 2.3.0: Use
UiDeviceglobal actions (home, back, recents, notifications, quick settings) and interact with UI nodes across package boundaries. - Modern selector-based element targeting: Use
BySelectorwithByfactory methods to resolveUiObject2elements usingBySelectorcriteria. - Robustness for real device flakiness: Handle
findObjectreturning null, preferdevice.wait(Until...), and recover fromStaleObjectExceptionby re-finding after transitions or UI refreshes. - Safer launch strategy for foreign packages: Prefer
Context.startActivityplus<queries>on API 30+, while documenting the discouragedexecuteShellCommandpath. - Use cases: Turn Wi‑Fi on/off via Settings, dismiss the notification shade, test a share/contact picker flow that spans the app under test and another activity.
Quick Start
Use cross-app-tests-with-uiautomator to launch Settings from an instrumentation test, wait until the target Settings package appears, and then click a specific Settings screen element using a By selector.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: cross-app-tests-with-uiautomator Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#cross-app-tests-with-uiautomator Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.