vebidor v5.1.0 — codegen/session recorder for web AND native mobile, in pure V
Quick context up front: I have ALS and can't use keyboard anymore, so I use AI to help me write and move the code along. The design and the live testing are mine.
I posted vebidor 5.0 (native iOS/Android automation in V, no Appium/Node), and someone in the thread made a point that stuck: the comparison docs dismissed codegen as "low automation value," and that was wrong — the real time-sink in writing tests isn't watching a trace afterward, it's the write-a-locator → run → fix → rewrite-after-every-refactor loop. Codegen is in the hot path of actually authoring a suite; a trace viewer is just a debugging nicety.
They were right. So 5.1.0 is the codegen / session recorder.
What it does: record a live session and it emits runnable vebidor V source. The key design choice is that generated locators go through the same semantic get_by_* engines you'd hand-write — get_by_role, get_by_label, get_by_test_id — verified unique at capture time, with a CSS/xpath fallback only when nothing semantic is unique. So the output is the refactor-resistant shape, not a brittle div:nth-child(3) chain that breaks on the next reorg.
Web (over WebDriver-BiDi): an in-page recorder watches your clicks/inputs/Enter, synthesizes the selector, and streams actions back. Verified on Edge with a full capture → emit → compile → replay round-trip — the generated program re-runs and every recorded locator resolves.
v run tools/codegen.v web https://example.com --out flow.v
# click around; Alt+click to record an assertion; press Enter to finish
Native mobile is the part I'm happiest with, because there's no preload-script trick available — native apps can't take injected JS. So:
- Android is passive: it streams
adb shell getevent, scales raw touch coordinates to screen pixels, and on each tap snapshots the UiAutomator2 accessibility tree (page_source), hit-tests the smallest node containing the point, and synthesizes a cross-platform selector. Verified live on an emulator (Pixel AVD, API 34) — an on-device round-trip re-resolved 5/5 generated selectors against the live tree. - iOS has no passive touch stream over XCUITest, so it's an honest assisted REPL (
tap x y/text …/assert x y/done) rather than pretending to capture taps. Offline-tested; not yet run on a physical device — calling that out rather than overclaiming.
One action model + emitters feed both front-ends, so the same recording machinery targets vebidor.webdriver and vebidor.mobile.
Standards-based the whole way down — no CDP-only tricks, no Node. Install with v install vebidor.
Happy to talk about the gnarly bits — the getevent coordinate scaling, or synthesizing selectors from the accessibility tree so they survive refactors.