正在加载视频...

视频加载失败

WHAT IF WE TEST GOOGLE MAPS? How easy would that be? 👇

18,759 次观看 • 1 年前 •via X (Twitter)

11 条评论

Maestro 的头像
Maestro1 年前

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

Maestro 的头像
Maestro1 年前

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.

Maestro 的头像
Maestro1 年前

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

Maestro 的头像
Maestro1 年前

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.

Maestro 的头像
Maestro1 年前

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.

Maestro 的头像
Maestro1 年前

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.

Maestro 的头像
Maestro1 年前

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.

Maestro 的头像
Maestro1 年前

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

Maestro 的头像
Maestro1 年前

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

Fardeem 的头像
Fardeem1 年前

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

Maestro 的头像
Maestro1 年前

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

相关视频