cross-app-tests-with-uiautomator

Community

Drive Settings and other apps from tests.

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 UiDevice global actions (home, back, recents, notifications, quick settings) and interact with UI nodes across package boundaries.
  • Modern selector-based element targeting: Use BySelector with By factory methods to resolve UiObject2 elements using BySelector criteria.
  • Robustness for real device flakiness: Handle findObject returning null, prefer device.wait(Until...), and recover from StaleObjectException by re-finding after transitions or UI refreshes.
  • Safer launch strategy for foreign packages: Prefer Context.startActivity plus <queries> on API 30+, while documenting the discouraged executeShellCommand path.
  • 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 required

Components

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.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.