mobile-testing-maestro
Maestro Mobile UI Testing Patterns
Quick Guide: Write E2E tests as declarative YAML flows. Use
idselectors for stable element targeting (not text that changes with localization). UserunFlowto compose reusable subflows (login, setup). UsewaitForAnimationToEndbefore assertions on animated screens. UseonFlowStart/onFlowCompletehooks for setup/teardown. Maestro auto-retries assertions for up to 7 seconds before failing. Current stable: CLI 2.4.0.
<critical_requirements>
CRITICAL: Before Using This Skill
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST use id selectors (accessibility identifiers) as primary selectors - text selectors break with localization or copy changes)
(You MUST use runFlow for reusable sequences (login, onboarding) - NEVER duplicate steps across flow files)
(You MUST use waitForAnimationToEnd before assertions on screens with animations or transitions - assertions on animated elements are flaky)
(You MUST pair every startRecording with a stopRecording - unpaired commands produce corrupted or missing video files)