u/Usual-Complaint2581

▲ 6 r/vlang+1 crossposts

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_roleget_by_labelget_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.

reddit.com
u/Usual-Complaint2581 — 9 days ago
▲ 8 r/vlang+1 crossposts

Vebidor v5.0.0 — a V-native browser and mobile automation library (W3C WebDriver + BiDi + iOS/Android), no Node

I've been building vebidor, a browser/mobile automation library written entirely in V — think Selenium/Playwright/Appium, but as a native V module with no Node runtime and no bundled browser. v5.0.0 just added native mobile, so it now covers web and real-device automation from one API.

What it does

  • Web (W3C WebDriver Classic) — 100% Selenium feature parity, drives Edge/Chrome/Firefox/Safari.
  • Playwright-style ergonomics — lazy auto-waiting Locators, get_by_role/text/label/... selectors, web-first retrying assertions, one-call launch().
  • WebDriver-BiDi (the W3C bidirectional protocol over WebSocket) — network interception/mocking, HTTP auth, console/network events, isolated contexts, preload scripts, tracing.
  • Native mobile (new in v5.0.0) — vebidor.mobile drives WebDriverAgent (iOS) and the UiAutomator2 server (Android) directly over their HTTP sockets. Same backends Appium uses, minus the Node middleware. Cross-platform get_by_*, gestures, app lifecycle, device state.

​

import vebidor.webdriver


fn main() {
    mut b := webdriver.launch_edge(webdriver.LaunchOptions{ headless: true })!
    defer { b.close() }
    b.goto('https://example.com')!
    webdriver.expect(b.wd.get_by_role('heading', ''))!.to_be_visible()!
}

import vebidor.mobile


fn main() {
    mut s := mobile.launch_ios(mobile.IOSOptions{ mode: .simulator, udid: '...', wda_xctestrun: '...' })!
    defer { s.close() }
    s.get_by_label('General').tap()!
    mobile.expect(s.get_by_text('About')).to_be_visible()!
}

Why it exists

It's the only real automation option in V, and it's standards-based all the way down — W3C WebDriver + W3C BiDi for the web, and the public on-device servers for mobile. No Chromium-only CDP lock-in, no proprietary wire. Compiles to a native binary.

Honest about limitations

  • No binary trace viewer / video / codegen like Playwright (there's a JSON tracer).
  • No hybrid-app webview driving yet on mobile (Appium still wins there).
  • iOS real-device work needs a macOS host (code signing). Android works anywhere adb does.
  • BiDi can't dispatch real touch events — that's a protocol gap, not an impl gap.

Links

Built and verified live (headless Edge for web; iOS Simulator + Android Emulator for mobile). Feedback and issues very welcome — especially from anyone using V for scraping or end-to-end testing.

reddit.com
u/Usual-Complaint2581 — 11 days ago
▲ 3 r/vlang+1 crossposts

Vebidor v4.2.0 — Playwright-style API + WebDriver-BiDi + mobile emulation | 100% Selenium parity | Production Ready written in pure V

Vebidor is a native V implementation of the W3C WebDriver protocol — and as of v4.2.0 it also speaks WebDriver-BiDi and ships a Playwright-style API with Mobile emulation on top. No Node runtime, no bundled Chromium, no bindings to another language — it compiles to a single native binary and talks to any conformant driver (Edge, Chrome, Firefox, Safari).

What's new in 4.2.0:

Playwright-style ergonomics
Playwright's "mobile" is device emulation (device descriptors: viewport, UA, device-scale-factor, isMobile, hasTouch, touch input) — not real-device automation (that's Appium). Vebidor is matching the emulation side over BiDi. Fidelity is best on Chromium-based drivers (Edge/Chrome); each emulation.* call is gated by supports().

WebDriver-BiDi (bidirectional, over WebSocket) — coexists with the classic session:
- Network interception & mocking (route / fulfill / abort), response-phase interception, and HTTP auth.,
- Console + network event listeners, wait_for_event, cookie-change events.,
- Isolated user contexts, preload scripts (addInitScript-style), viewport emulation, file upload, screenshots/PDF, and a lightweight tracer.,

Still 100% feature parity with Selenium's classic WebDriver surface. Every feature above was verified live against headless Edge.

u/Usual-Complaint2581 — 17 days ago
▲ 7 r/vlang+1 crossposts

**What's new in Vebidor 4.0.0:**

Vebidor v4.0.0 — a Playwright-style browser automation library, written in pure V

Vebidor is a native V implementation of the W3C WebDriver protocol — and as of v4.0.0 it also speaks WebDriver-BiDi and ships a Playwright-style API on top. No Node runtime, no bundled Chromium, no bindings to another language — it compiles to a single native binary and talks to any conformant driver (Edge, Chrome, Firefox, Safari).

Playwright-style ergonomics

  • One-call launch() — auto-detects the driver + browser, picks a free port, tears everything down on close. No more "start chromedriver on 9515."

  • Lazy, auto-waiting Locators that re-resolve on every use (immune to stale elements): get_by_role, get_by_text, get_by_label, get_by_placeholder, get_by_test_id.

  • Web-first assertions that poll until they pass: expect(loc).to_be_visible(), .to_have_text(), etc., with .not() and .with_timeout().

WebDriver-BiDi (bidirectional, over WebSocket) — coexists with the classic session:

  • Network interception & mocking (route / fulfill / abort), response-phase interception, and HTTP auth.

  • Console + network **event listeners**, `wait_for_event`, cookie-change events.

  • Isolated user contexts, preload scripts (addInitScript-style), viewport emulation, file upload, screenshots/PDF, and a lightweight tracer.

Still 100% feature parity with Selenium's classic WebDriver surface. Every feature above was verified live against headless Edge.


import vebidor.webdriver

fn main() {

mut b := webdriver.launch\_edge(webdriver.LaunchOptions{ headless: true, bidi: true })!

defer { b.close() }

mut bidi := b.bidi()!

bidi.route(fn (req webdriver.InterceptedRequest) {

if req.url.contains('/api') {

req.fulfill(200, 'application/json', '{"mocked":true}') or {}

} else {

req.continue\_request() or {}

}

})!

b.goto('[https://example.com](https://example.com)')!

b.wd.get\_by\_role('link', '').click()!

webdriver.expect(b.wd.get\_by\_role('heading', '')).to\_be\_visible()!

}

Feedback and contributions welcome — especially testing across Chrome/Firefox/Safari on other platforms.

reddit.com
u/Usual-Complaint2581 — 19 days ago

Vebidor - W3C Webdriver Protocol Implementation

https://preview.redd.it/gec87yae7h2h1.png?width=266&format=png&auto=webp&s=b9114eb747e87a294b8bec857d0394d42e85b9c3

Version 3.1.1 | 🎉 100% Feature Parity with Selenium 🎉 | Production Ready

🚀 Features

✅ Fully Implemented (100% Coverage) 🎉

Core Features:

  • Session Management - Create, manage, and quit browser sessions
  • Navigation - Navigate, back, forward, refresh
  • Element Location - Find elements by CSS selector, XPath, ID, class name, tag name, link text
  • Element Interaction - Click, send keys, clear, submit forms ✅ 100% Complete
  • JavaScript Execution - Execute synchronous and asynchronous scripts ✅ 100% Complete
  • Cookies - Get, add, delete, clear all cookies
  • Screenshots - Capture page and element screenshots (base64)
  • Frame Switching - Switch between frames, iframes, and parent frame
  • Actions API - Complete keyboard, mouse, wheel, drag-and-drop ✅ 100% Complete

Vebidor Github link

reddit.com
u/Usual-Complaint2581 — 21 days ago
▲ 6 r/vlang

Vebidor - W3C Webdriver Protocol Implementation

https://preview.redd.it/gec87yae7h2h1.png?width=266&format=png&auto=webp&s=b9114eb747e87a294b8bec857d0394d42e85b9c3

Version 3.1.1 | 🎉 100% Feature Parity with Selenium 🎉 | Production Ready

🚀 Features

✅ Fully Implemented (100% Coverage) 🎉

Core Features:

  • Session Management - Create, manage, and quit browser sessions
  • Navigation - Navigate, back, forward, refresh
  • Element Location - Find elements by CSS selector, XPath, ID, class name, tag name, link text
  • Element Interaction - Click, send keys, clear, submit forms ✅ 100% Complete
  • JavaScript Execution - Execute synchronous and asynchronous scripts ✅ 100% Complete
  • Cookies - Get, add, delete, clear all cookies
  • Screenshots - Capture page and element screenshots (base64)
  • Frame Switching - Switch between frames, iframes, and parent frame
  • Actions API - Complete keyboard, mouse, wheel, drag-and-drop ✅ 100% Complete

Vebidor Github link

reddit.com
u/Usual-Complaint2581 — 23 days ago