leonard_native 0.2.1
leonard_native: ^0.2.1 copied to clipboard
A pure-Dart Leonard contract extension that perceives and drives a native mobile app over the OS accessibility tree (via Appium/XCUITest): a stateful, self-watching extension projecting the a11y tree [...]
leonard_native #
A pure-Dart Leonard contract extension that lets the target-agnostic Leonard
driver perceive and drive a native mobile app (iOS first) over the
unchanged ext.leonard.* surface — by observing the OS accessibility tree
(via Appium/XCUITest) instead of a Flutter widget tree or a tmux server.
This is the native analogue of leonard_tmux:
| tmux | native |
|---|---|
TmuxExtension |
NativeExtension |
TmuxObservation |
NativeSnapshot |
TmuxPerception |
NativePerception |
TmuxClient seam |
NativeBackend seam |
ProcessTmuxExecutor |
XcuiTestBackend |
NativeExtension exposes four tools — native.tap, native.enter_text,
native.press, native.swipe — and projects the a11y tree into the
extensions.native observation fragment. The fragment uses the same canonical
per-node record schema as the Flutter semantics fragment
({id, role, rect, label?, value?, state?, actions?, scroll?}).
Running the host #
The host runner serves the native extension over the VM service. It expects
an already-running Appium server and an already-booted iOS simulator
(it does NOT boot either):
dart run --enable-vm-service=0 --disable-service-auth-codes \
bin/leonard_native_host.dart \
--udid <booted-sim-udid> --app /path/to/Runner.app
It prints LEONARD_HOST_READY once installed; point a LeonardSession (or
leonard_cli / leonard_drive) at the printed VM-service ws URI.
Args:
--server <url>— Appium server (defaulthttp://127.0.0.1:4723)--udid <udid>— booted simulator udid (required)--app <path>— path to the.appbundle (required)--platform ios— target platform (defaultios)