All work

Browser automation on Android · Independent builder

Droidwright

Playwright-Style WebView Automation for Android

A native Expo module that drives offscreen Android WebViews with a Playwright-like TypeScript API: navigation, locators, fills, taps, waits, screenshots, cookies and storage, inside the app itself. No desktop Chrome, ADB or Appium.

Stack
TypeScriptKotlinExpoAndroid
droidwright · script.tsconst page = await launch()await page.goto('example.com')await page.locator('#email').fill(me)await page.getByText('Sign in').tap()const png = await page.screenshot()await page.close()about:blankSign inEMAILSign inscreenshot.pngoffscreen WebView · inside the appno desktop chrome · no adb · no appium

Playwright-inspired Android WebView automation for React Native and Expo. No desktop Chrome, no ADB, no Appium, no remote server: just a WebView running inside your app.

01The Problem

Browser automation usually lives on a desktop or a server: Playwright or Puppeteer driving Chrome, or Appium driving a device over ADB. When the automation needs to happen on the phone, inside an app (logging into a site, reading a page, filling a form, capturing a screen), those tools don't fit. You end up hand-writing injectJavaScript strings and polling for results.

02The Solution

Droidwright creates offscreen Android WebView sessions from a native Expo module and exposes a TypeScript API that feels familiar if you have used Playwright or Puppeteer.

import { launch } from 'droidwright'

const page = await launch({ debug: true })
await page.goto('https://example.com')
await page.locator('#email').fill('user@example.com')
await page.getByText('Sign in', { exact: true }).tap()
const png = await page.screenshot()
await page.close()

03Key Features

  • Sessions - Launch several offscreen WebViews with their own user agent, viewport and debugging; close one or all.
  • Navigation - goto, reload and goBack, with timeouts that throw a typed error.
  • Evaluate - Run JavaScript in the page with explicit arguments, since closures aren't captured.
  • Waiting - For a selector, for visible text, or for any JavaScript condition to become true.
  • Interactions - Click, tap, fill, hover, press and select, each dispatching the real pointer, mouse and keyboard events, after actionability checks.
  • Locators - Lazy CSS and text locators that don't touch the DOM until an action runs.
  • Screenshots - Real rendered pixels from the offscreen WebView, as a PNG.
  • Cookies and storage - Page-scoped or global cookies, and per-session localStorage and sessionStorage.

04Honest Constraints

  • Android only. On web and iOS every call rejects with a clear error instead of crashing, so cross-platform apps can guard with Platform.OS === 'android'.
  • A native module. It needs a development build or prebuild; it can't run in Expo Go.
  • Supports Expo SDK 54 to 56.

05Technical Stack

  • Kotlin - The Expo module that owns the WebViews, rendering and event dispatch.
  • TypeScript - The Playwright-style API, locators and waits.
  • Expo Modules API - Native bridging for React Native.

Next project

SavannahDB

Embedded and Server Document Database