Video wird geladen...
Video konnte nicht geladen werden
WHAT IF WE TEST GOOGLE MAPS? How easy would that be? 👇
18,759 Aufrufe • vor 11 Monaten •via X (Twitter)
11 Kommentare

1️⃣ Setup once: curl -fsSL | bash 👉

2️⃣ Launch the App (with clearState) Using clearState ensures the app starts without previous data (shared preferences, databases, accounts, etc.). Think of it as a fresh install every time.

3️⃣ Tap any element by its text or ID easily: TapOn docs:

4️⃣ Typing: Maestro inputs text into fields automatically, even if they aren't initially focused: - inputText: san francisco You can also generate random inputs, like emails, names, or numbers, for varied test scenarios.

5️⃣ Swipe Precisely In our test, we swipe upwards from a specific element (header) to reveal more content. Specify swipes by direction (UP, DOWN, LEFT, RIGHT) or exact coordinates.

6️⃣ Scroll Until Element Visible Maestro scrolls automatically until the specified element is visible—very handy for dynamic lists. You can also set scrolling direction, speed, and timeout duration.

7️⃣ Validate with Regex Regex assertions ensure dynamic content like timestamps (e.g., 3:15) are correctly displayed: - assertVisible: '[0-9]+:[0-9][0-9]' Regex provides powerful and flexible validations for text-based elements.

🧪 Running the Test Simply execute: maestro test google-maps.yaml The CLI provides real-time feedback with a green checkmark (✅) for each successful step.

Why Maestro? ✅ Declarative & readable YAML ✅ Cross-platform (Android, iOS, Web) ✅ Quick and reliable tests ✅ Fully open source (Apache-2.0)

This is great! How do yall recommend getting past oauth flows and sign in pages

Maestro can work across multiple apps and even mobile browsers, so Maestro can interact with sign in screens that open up in the mobile browser just fine. As long as it accepts username / password you can pass those in as environment variables to your script: things like multi-factor auth, we recommend setting your app up so that can be bypassed in testing environments

