mobilewright 0.0.64 → 0.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -34
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Mobilewright
1
+ # <img src="https://mobilewright.dev/mobilewright-logo.png" alt="" height="32"> Mobilewright
2
2
 
3
3
  [![npm](https://img.shields.io/npm/dm/mobilewright?style=flat-square&label=npm%20downloads)](https://www.npmjs.com/package/mobilewright)
4
4
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue?style=flat-square)](LICENSE)
@@ -10,6 +10,42 @@ Framework for mobile device automation, inspired by Playwright's architecture an
10
10
 
11
11
  [Get Started](#quick-start) · [API Docs](#api-reference) · [Roadmap](ROADMAP.md) · [Mobile Next Cloud](https://mobilenext.ai/cloud?utm_source=github&utm_medium=readme&utm_campaign=mobilewright&utm_content=hero)
12
12
 
13
+ ![One Mobilewright test running on an iPhone and an Android phone side by side](https://raw.githubusercontent.com/mobile-next/mobilewright/main/docs/src/images/cart-test.gif)
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ npm install mobilewright @mobilewright/test
19
+ npx mobilewright init
20
+ ```
21
+
22
+ ```typescript
23
+ import { test, expect } from '@mobilewright/test';
24
+
25
+ test('can sign in', async ({ screen }) => {
26
+ await screen.getByLabel('Email').fill('user@example.com');
27
+ await screen.getByLabel('Password').fill('password123');
28
+ await screen.getByRole('button', { name: 'Sign In' }).tap();
29
+
30
+ await expect(screen.getByText('Welcome back')).toBeVisible();
31
+ });
32
+ ```
33
+
34
+ ```bash
35
+ npx mobilewright test
36
+ ```
37
+
38
+ ## Features
39
+
40
+ - **Playwright-style API** — `screen.getByRole('button').tap()`, just like `page.getByRole('button').click()`
41
+ - **Zero config** — auto-discovers booted simulators
42
+ - **Cross-platform** — unified interface for iOS and Android
43
+ - **Auto-waiting** — actions wait for elements to be visible, enabled, and stable before interacting
44
+ - **Chainable locators** — `screen.getByType('Cell').getByLabel('Item 1')`
45
+ - **Retry assertions** — `expect(locator).toBeVisible()` polls until satisfied or timeout
46
+ - **Remote support** — connect to mobilecli on another machine for device lab setups
47
+ - **Test fixtures** — `@mobilewright/test` extends Playwright Test with `screen` and `device` fixtures
48
+
13
49
  ## Why Mobilewright?
14
50
 
15
51
  If you've used Playwright, you already know Mobilewright.
@@ -39,39 +75,6 @@ await expect(screen.getByText('Welcome')).toBeVisible();
39
75
 
40
76
  No XPath. No coordinates. No vision model. The agent reads the accessibility tree and acts on it directly.
41
77
 
42
- ## Features
43
-
44
- - **Playwright-style API** — `screen.getByRole('button').tap()`, just like `page.getByRole('button').click()`
45
- - **Zero config** — auto-discovers booted simulators
46
- - **Cross-platform** — unified interface for iOS and Android
47
- - **Auto-waiting** — actions wait for elements to be visible, enabled, and stable before interacting
48
- - **Chainable locators** — `screen.getByType('Cell').getByLabel('Item 1')`
49
- - **Retry assertions** — `expect(locator).toBeVisible()` polls until satisfied or timeout
50
- - **Remote support** — connect to mobilecli on another machine for device lab setups
51
- - **Test fixtures** — `@mobilewright/test` extends Playwright Test with `screen` and `device` fixtures
52
-
53
- ## Quick Start
54
-
55
- ```bash
56
- npm install mobilewright
57
- ```
58
-
59
- ```typescript
60
- import { ios, expect } from 'mobilewright';
61
-
62
- const device = await ios.launch({ bundleId: 'com.example.myapp' });
63
- const { screen } = device;
64
-
65
- await screen.getByLabel('Email').fill('user@example.com');
66
- await screen.getByLabel('Password').fill('password123');
67
- await screen.getByRole('button', { name: 'Sign In' }).tap();
68
-
69
- await expect(screen.getByText('Welcome back')).toBeVisible();
70
- const screenshot = await screen.screenshot();
71
-
72
- await device.close();
73
- ```
74
-
75
78
  ## Prerequisites
76
79
 
77
80
  - Node.js >= 22.12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobilewright",
3
- "version": "0.0.64",
3
+ "version": "0.0.65",
4
4
  "description": "Mobile device automation framework inspired by Playwright",
5
5
  "homepage": "https://mobilewright.dev",
6
6
  "license": "Apache-2.0",
@@ -34,11 +34,11 @@
34
34
  "templates"
35
35
  ],
36
36
  "dependencies": {
37
- "@mobilewright/core": "^0.0.64",
38
- "@mobilewright/driver-mobilecli": "^0.0.64",
39
- "@mobilewright/driver-mobilenext": "^0.0.64",
40
- "@mobilewright/inspector": "^0.0.64",
41
- "@mobilewright/protocol": "^0.0.64",
37
+ "@mobilewright/core": "^0.0.65",
38
+ "@mobilewright/driver-mobilecli": "^0.0.65",
39
+ "@mobilewright/driver-mobilenext": "^0.0.65",
40
+ "@mobilewright/inspector": "^0.0.65",
41
+ "@mobilewright/protocol": "^0.0.65",
42
42
  "commander": "^15.0.0",
43
43
  "open": "^10.2.0",
44
44
  "debug": "^4.4.3",