@wdio/mcp 2.2.1 → 2.3.1
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 +15 -1
- package/lib/server.js +503 -269
- package/lib/server.js.map +1 -1
- package/lib/snapshot.d.ts +40 -56
- package/lib/snapshot.js +355 -161
- package/lib/snapshot.js.map +1 -1
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -219,6 +219,16 @@ start_browser({windowWidth: 1920, windowHeight: 1080})
|
|
|
219
219
|
|
|
220
220
|
// Headless with custom dimensions
|
|
221
221
|
start_browser({headless: true, windowWidth: 1920, windowHeight: 1080})
|
|
222
|
+
|
|
223
|
+
// Pass custom capabilities (e.g. Chrome extensions, profile, prefs)
|
|
224
|
+
start_browser({
|
|
225
|
+
headless: false,
|
|
226
|
+
capabilities: {
|
|
227
|
+
'goog:chromeOptions': {
|
|
228
|
+
args: ['--user-data-dir=/tmp/wdio-mcp-profile', '--load-extension=/path/to/unpacked-extension']
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
})
|
|
222
232
|
```
|
|
223
233
|
|
|
224
234
|
### Mobile App Automation
|
|
@@ -354,7 +364,11 @@ start_app_session({
|
|
|
354
364
|
deviceName: 'emulator-5554',
|
|
355
365
|
noReset: true, // Don't reset app state
|
|
356
366
|
fullReset: false, // Don't uninstall
|
|
357
|
-
autoGrantPermissions: true
|
|
367
|
+
autoGrantPermissions: true,
|
|
368
|
+
capabilities: {
|
|
369
|
+
'appium:chromedriverExecutable': '/path/to/chromedriver',
|
|
370
|
+
'appium:autoWebview': true
|
|
371
|
+
}
|
|
358
372
|
})
|
|
359
373
|
// App launches with existing user data, login tokens, preferences intact
|
|
360
374
|
```
|