Mobilewright is a mobile device automation framework for iOS and Android, inspired by Playwright's architecture and developer experience. Current stable version is 0.0.41, released as a pre-1.0 alpha with frequent updates. It provides a cross-platform API for tapping, filling, and asserting on mobile apps using semantic locators (getByRole, getByLabel, getByText) and built-in auto-waiting. Unlike Appium (verbose WebDriver, manual waits) and Detox (React Native only), Mobilewright offers a zero-config setup, accessibility-tree-based interaction optimized for AI agents, and remote device support via mobilecli. It is ESM-only, requires Node >=18, and ships TypeScript types.
npm install mobilewrightNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Launches an iOS app, fills login fields, taps Sign In, asserts welcome text visible, and takes a screenshot.
Pin exact version in package.json: "mobilewright": "0.0.41"
Use import syntax or upgrade Node >=22 and set --experimental-require-module
Always pass `bundleId` for iOS or `packageName` for Android
Replace with `screen.getByRole()`, `screen.getByLabel()`, etc.
Convert to ESM ("type": "module" in package.json) or use dynamic import: const { ios } = await import('mobilewright')Use `import { ios } from 'mobilewright'` instead of `import ios from 'mobilewright'`Boot a simulator: `xcrun simctl boot <device>` (iOS) or `emulator -avd <avd> &` (Android), then run `npx mobilewright doctor`
Pass `bundleId` to `ios.launch()`: `await ios.launch({ bundleId: 'com.example.app' })`