Skip to content

feat(clients): expand typed bindings with gesture, media, device and browser steps - #1

Merged
pr4bh4sh merged 2 commits into
mainfrom
feat/expand-client-bindings
Aug 29, 2026
Merged

pr4bh4sh merged 2 commits into
mainfrom
feat/expand-client-bindings

Conversation

@pr4bh4sh

Copy link
Copy Markdown
Owner

Summary

Expands the TypeScript and Python MaestroClient bindings so the most common server step types are available as typed, autocompleted methods instead of only via the raw executeStep escape hatch.

  • Gestures: doubleTapOn, longPressOn, dragAndDrop, scrollUntilVisible
  • Assertions & media: assertScreenshot, takeScreenshot, copyTextFrom, pasteText, setClipboard
  • AI & scripting: assertWithAI, evalScript, runScript, evalBrowserScript
  • Device control: setLocation, setAirplaneMode, toggleAirplaneMode, setNetworkConditions, openNotifications, setDarkMode, setOrientation
  • Browser (web): openBrowser, switchTab, closeTab, getConsoleLogs, clearConsoleLogs, assertNoJSErrors, mockNetwork
  • Also includes the permissions/WebView set added earlier: setPermissions, resetPermissions, evalWebViewScript, runWebViewScript

Each method maps 1:1 to a server step type. The low-level executeStep/execute_step still forwards any raw step dict, so the remaining ~90 server step types remain reachable.

Verification

  • npm run build (tsc) passes for the TypeScript client.
  • python3 -m py_compile passes for the Python client.
  • Both client READMEs now carry the full method table; both tutorials gained a "More step types" section with runnable examples.

Test plan

  • cd client/typescript && npm run build && npm run lint
  • cd client/python && pip install -e ".[dev]" && ruff check maestro_runner && mypy maestro_runner
  • Drive a few of the new steps against a running maestro-runner server to confirm the JSON payloads match the server.

🤖 Generated with opencode

…browser steps

Add typed MaestroClient methods for the most common step types not yet wrapped in
the TypeScript and Python clients:

- Gestures: doubleTapOn, longPressOn, dragAndDrop, scrollUntilVisible
- Assertions & media: assertScreenshot, takeScreenshot, copyTextFrom, pasteText, setClipboard
- AI & scripting: assertWithAI, evalScript, runScript, evalBrowserScript
- Device control: setLocation, setAirplaneMode, toggleAirplaneMode,
  setNetworkConditions, openNotifications, setDarkMode, setOrientation
- Browser (web): openBrowser, switchTab, closeTab, getConsoleLogs,
  clearConsoleLogs, assertNoJSErrors, mockNetwork

Each method maps 1:1 to a server step type. The low-level executeStep/execute_step
still forwards any raw step dict, so the remaining ~90 server step types remain
reachable. Docs (client READMEs + tutorials) updated with a full method table and
examples.
@github-actions

Copy link
Copy Markdown

e2e-android: Run #13

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
5 4 1 0 0 0 0 not captured

Some tests failed!

Name Failure Message
❌ maestro-runner: Contact persists after relaunch Element not visible: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters (cause: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters)

Github Test Reporter by CTRF 💚

@github-actions

Copy link
Copy Markdown

e2e-android: Run #14

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
5 4 1 0 0 0 0 not captured

Some tests failed!

Name Failure Message
❌ maestro-runner: Contact persists after relaunch Element not visible: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters (cause: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters)

Github Test Reporter by CTRF 💚

@github-actions

Copy link
Copy Markdown

e2e-android: Run #15

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
5 5 0 0 0 0 0 not captured

🎉 All tests passed!

Github Test Reporter by CTRF 💚

@github-actions

Copy link
Copy Markdown

e2e-android: Run #18

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
5 3 2 0 0 0 0 not captured

Some tests failed!

Name Failure Message
❌ maestro-runner: Contact persists after relaunch Element not visible: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters (cause: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters)
❌ WaitForAnimationToEnd: WaitForAnimationToEnd should time out on an infinite (camera preview) animation No failure message

Github Test Reporter by CTRF 💚

@pr4bh4sh
pr4bh4sh merged commit 9448fa1 into main Aug 29, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant