traversing-the-semantics-tree
CommunityNavigate Compose nodes by structure
Software Engineering#jetpack-compose#ui-testing#semantics-traversal#onchildren#onparent#filtertoone#lazycolumn-testing
Authorskydoves
Version1.0.0
Installs0
System Documentation
What problem does it solve?
When a Compose UI test can’t reliably find a node using a single matcher, this skill solves the problem of locating nodes by their structural relationships in the semantics tree (parent/child/sibling/ancestors) instead of relying on brittle assumptions.
Core Features & Use Cases
- Semantics tree navigation via relationship operators like onParent(), onChildren(), onChild(), onChildAt(), onSibling(), onSiblings(), and onAncestors().
- Safer narrowing with filterToOne(matcher) and positional selection using onFirst(), onLast(), and the collection [index] operator.
- Guidance on common pitfalls: LazyColumn/LazyRow only include currently composed children, onChildren() is a snapshot, and useUnmergedTree is sticky across navigation.
- Decision support on when to traverse vs when to add a stable testTag, and when to prefer semantics matchers (hasAnyAncestor/hasAnyDescendant).
Quick Start
Use this skill to ask an AI how to find the second child of a Row that contains no stable testTag so you can assert what that sibling/relative node should look like.
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: traversing-the-semantics-tree Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#traversing-the-semantics-tree 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.