finding-nodes-by-tag-text-content

Selects Compose semantics nodes using tag, text, or content description queries.

303|10|Updated May 15, 2026
One-click install
npx skills add https://github.com/skydoves/android-testing-skills --skill finding-nodes-by-tag-text-content
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finding-nodes-by-tag-text-content
Source: https://github.com/skydoves/android-testing-skills/tree/main/compose/finders/finding-nodes-by-tag-text-content
Command: npx skills add https://github.com/skydoves/android-testing-skills --skill finding-nodes-by-tag-text-content

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill fixes flaky or failing Jetpack Compose UI tests caused by not finding the intended semantics node, finding the wrong number of nodes, or targeting the wrong (merged vs unmerged) semantics tree.

Core Features & Use Cases

  • Finder selection from UI signals: choose the right query based on test tags, visible text, or accessibility content descriptions.
  • Correct count contract handling: use single-node finders for exactly one match and plural finders when zero matches are acceptable.
  • Merged vs unmerged reasoning: switch to unmerged tree only when targeting inner elements collapsed by merged semantics (for example, Text inside a Button).

Quick Start

Ask the AI to explain which Compose finder to use for a reported error like “Expected exactly '1' node but could not find any node…”, including whether to toggle useUnmergedTree.

Frequently Asked Questions about finding-nodes-by-tag-text-content

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Jetpack Compose UI test failures when onNodeWithTag cannot find any nodes?

To fix Jetpack Compose UI test failures where onNodeWithTag cannot find nodes, you must verify your finder selection and ensure the correct count contract is used, switching to plural finders if zero matches are acceptable.

When should I use useUnmergedTree in Compose UI testing to find inner elements?

You should use useUnmergedTree in Compose UI testing only when targeting inner elements collapsed by merged semantics, such as a Text node inside a Button, ensuring proper visibility within the semantics tree.

What causes ambiguous semantics node matches in Jetpack Compose UI tests and how do I resolve them?

Ambiguous semantics node matches in Jetpack Compose UI tests are caused by incorrect finder selection or merged-tree visibility issues, resolved by choosing the right query based on test tags, visible text, or accessibility content descriptions.

Does Jetpack Compose UI testing support internationalization-safe strategies for finding nodes by text?

Jetpack Compose UI testing supports internationalization-safe strategies by prescribing finder selection based on test tags or content descriptions rather than visible text, avoiding match failures across different locales.

Why does my Compose test expect exactly one node but find the wrong count?

Your Compose test expects exactly one node but finds the wrong count due to incorrect count contract handling, requiring single-node finders for exactly one match and plural finders when zero matches are acceptable.