clicking-and-scrolling
Installation
SKILL.md
Clicking and Scrolling — Drive the UI Without a Gesture Builder
Compose's high-level actions resolve to platform-appropriate primitives or to semantics actions that the composable already exposes. Use them whenever the test does not need pixel-level control over the gesture. Reach for performTouchInput { … } (see ../injecting-touch-gestures/SKILL.md) only when the high-level action cannot express the intent.
When to use this skill
- The developer asks "how do I click a Button / IconButton / clickable Box from a test".
- The test must reveal a node before asserting on it (e.g. an item that is currently below the fold).
- A test must scroll a
LazyColumn/LazyRowto a specific index, key, or matched item. - The test must trigger a focus change or invoke an
AccessibilityAction<T>declared viaModifier.semantics { … }. - The test must click a
LinkAnnotationinside aText.
When NOT to use this skill
- The test needs partial gestures, multi-touch, velocity-controlled flings, or split touch sequences across recomposition. Use
../injecting-touch-gestures/SKILL.md. - The test exercises a hover / scroll wheel / right-click flow. Use
../injecting-mouse-and-keyboard/SKILL.md. - The test enters text or fires an IME action. Use
../entering-text/SKILL.md. - A node lookup keeps failing. Verify the matcher first via
../../finders/finding-nodes-by-tag-text-content/SKILL.mdand../../debug/printing-the-semantics-tree/SKILL.md.