@mobilewright/test 0.0.55 → 0.0.57
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.
- package/README.md +9 -5
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Framework for mobile device automation, inspired by Playwright's architecture an
|
|
|
8
8
|
|
|
9
9
|
**Mobilewright** targets iOS and Android devices, simulators, and emulators through a clean, auto-waiting API built on top of [mobilecli](https://github.com/mobile-next/mobilecli).
|
|
10
10
|
|
|
11
|
-
[Get Started](#quick-start) · [API Docs](#api-reference) · [Roadmap](ROADMAP.md) · [Mobile Next Cloud](https://mobilenext.ai)
|
|
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
13
|
## Why Mobilewright?
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ If you've used Playwright, you already know Mobilewright.
|
|
|
21
21
|
| Setup | `npm install mobilewright` | Server + drivers + caps | React Native only | Xcode/AS only |
|
|
22
22
|
| Cross-platform | iOS + Android, one API | Yes, verbose | React Native only | Single platform |
|
|
23
23
|
| AI agent support | First-class (accessibility tree) | Limited | No | No |
|
|
24
|
-
| Real devices in the cloud | Via [Mobile Next Cloud](https://mobilenext.ai) | Yes (complex) | Simulators only | Yes |
|
|
24
|
+
| Real devices in the cloud | Via [Mobile Next Cloud](https://mobilenext.ai/cloud?utm_source=github&utm_medium=readme&utm_campaign=mobilewright&utm_content=comparison) and [others](https://mobilewright.dev/docs/cloud-providers/) | Yes (complex) | Simulators only | Yes |
|
|
25
25
|
| Locators | Semantic roles + labels | XPath, CSS, ID | Test IDs | Native queries |
|
|
26
26
|
|
|
27
27
|
## Built for AI agents
|
|
@@ -74,7 +74,7 @@ await device.close();
|
|
|
74
74
|
|
|
75
75
|
## Prerequisites
|
|
76
76
|
|
|
77
|
-
- Node.js >=
|
|
77
|
+
- Node.js >= 20.19
|
|
78
78
|
- A booted iOS simulator, Android emulator, or connected real device
|
|
79
79
|
|
|
80
80
|
Run `mobilewright doctor` to verify your environment is ready:
|
|
@@ -93,7 +93,7 @@ It checks Xcode, Android SDK, simulators, ADB, and other dependencies — and te
|
|
|
93
93
|
| `@mobilewright/test` | Test fixtures |
|
|
94
94
|
| `@mobilewright/protocol` | TypeScript interfaces (`MobilewrightDriver`, `ViewNode`) |
|
|
95
95
|
| `@mobilewright/driver-mobilecli` | WebSocket JSON-RPC client for mobilecli |
|
|
96
|
-
| `@mobilewright/driver-mobilenext` | WebSocket JSON-RPC client for [Mobile Next Cloud](https://mobilenext.ai) cloud devices |
|
|
96
|
+
| `@mobilewright/driver-mobilenext` | WebSocket JSON-RPC client for [Mobile Next Cloud](https://mobilenext.ai/cloud?utm_source=github&utm_medium=readme&utm_campaign=mobilewright&utm_content=packages) cloud devices |
|
|
97
97
|
| `@mobilewright/core` | `Device`, `Screen`, `Locator`, `expect` — the user-facing API |
|
|
98
98
|
|
|
99
99
|
Most users only need `mobilewright` (or `@mobilewright/test` for Playwright Test integration).
|
|
@@ -270,6 +270,10 @@ console.log(device.id);
|
|
|
270
270
|
await device.setOrientation('landscape');
|
|
271
271
|
const orientation = await device.getOrientation();
|
|
272
272
|
|
|
273
|
+
// Geolocation — override the GPS location the device reports
|
|
274
|
+
await device.setGeolocation({ latitude: -17.833, longitude: 177.947 });
|
|
275
|
+
await device.setGeolocation(null); // clear the override
|
|
276
|
+
|
|
273
277
|
// Screen dimensions and pixel density: { width, height, scale }
|
|
274
278
|
const size = await device.screenSize();
|
|
275
279
|
|
|
@@ -557,7 +561,7 @@ npx mobilewright merge-reports ./blob-reports --reporter json
|
|
|
557
561
|
|
|
558
562
|
## Run on real devices with Mobile Next Cloud
|
|
559
563
|
|
|
560
|
-
Need real phones in the cloud? [Mobile Next Cloud](https://mobilenext.ai) gives you API access to hundreds of real Android and iOS devices. Your Mobilewright scripts run with zero modification — point your config at the Mobile Next Cloud endpoint and go.
|
|
564
|
+
Need real phones in the cloud? [Mobile Next Cloud](https://mobilenext.ai/cloud?utm_source=github&utm_medium=readme&utm_campaign=mobilewright&utm_content=cloud-section) gives you API access to hundreds of real Android and iOS devices. Your Mobilewright scripts run with zero modification — point your config at the Mobile Next Cloud endpoint and go.
|
|
561
565
|
|
|
562
566
|
Mobile Next Cloud is the only device cloud with native Mobilewright support.
|
|
563
567
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobilewright/test",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57",
|
|
4
4
|
"description": "Test fixtures for Mobilewright",
|
|
5
5
|
"homepage": "https://mobilewright.dev",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=20.19"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "./dist/index.js",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@mobilewright/core": "^0.0.
|
|
33
|
-
"@mobilewright/protocol": "^0.0.
|
|
34
|
-
"@playwright/test": "1.
|
|
32
|
+
"@mobilewright/core": "^0.0.57",
|
|
33
|
+
"@mobilewright/protocol": "^0.0.57",
|
|
34
|
+
"@playwright/test": "1.62.1",
|
|
35
35
|
"debug": "^4.4.3",
|
|
36
|
-
"mobilewright": "^0.0.
|
|
36
|
+
"mobilewright": "^0.0.57"
|
|
37
37
|
}
|
|
38
38
|
}
|