You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update limitations for loading extensions within Cypress (#6183)
* update limitations for loading extensions within Cypress
* Update instructions to link to our docker image examples for other browsers
* lint fix
* Update docs/api/node-events/browser-launch-api.mdx
Co-authored-by: Mike McCready <[email protected]>
* Update docs/api/node-events/browser-launch-api.mdx
Co-authored-by: Mike McCready <[email protected]>
---------
Co-authored-by: Mike McCready <[email protected]>
|`preferences`|`object`| An object describing browser preferences. Differs between browsers. See [Changing browser preferences](#Changing-browser-preferences) for details.|
55
-
|`args`|`string[]`| An array of strings that will be passed as command-line args when the browser is launched. Has no effect on Electron. See [Modify browser launch arguments](#Modify-browser-launch-arguments) for details. |
56
-
|`extensions`|`string[]`| An array of paths to folders containing unpacked WebExtensions to be loaded before the browser starts. Note: Electron currently only supports Chrome DevTools extensions. See [Add browser extensions](#Add-browser-extensions) for details. |
57
-
|`env`|`object`| An object of environment variables to pass to the launched browser. See [Configure browser environment](#Configure-browser-environment) for details. |
|`preferences`|`object`| An object describing browser preferences. Differs between browsers. See [Change browser preferences](#Change-browser-preferences) for details. |
55
+
|`args`|`string[]`| An array of strings that will be passed as command-line args when the browser is launched. Has no effect on Electron. See [Modify browser launch arguments](#Modify-browser-launch-arguments) for details. |
56
+
|`extensions`|`string[]`| An array of paths to folders containing unpacked WebExtensions to be loaded before the browser starts. See [Add browser extensions](#Add-browser-extensions) for details.|
57
+
|`env`|`object`| An object of environment variables to pass to the launched browser. See [Configure browser environment](#Configure-browser-environment) for details. |
58
58
59
59
## Usage
60
60
61
-
### Modify browser launch arguments, preferences, extensions, and environment
62
-
63
61
Using the [setupNodeEvents](/app/plugins/plugins-guide#Using-a-plugin)
64
62
function you can tap into the `before:browser:launch` event and modify how
65
63
Cypress launches the browser (e.g. modify arguments, user preferences, and
@@ -72,14 +70,14 @@ how the browser is launched.
72
70
The returned `launchOptions` object will become the new launch options for the
73
71
browser.
74
72
75
-
####Modify browser launch arguments:
73
+
### Modify browser launch arguments
76
74
77
75
Here are args available for the currently supported browsers:
- Headless Chrome does not support loading extensions.
117
+
- Chrome-branded browsers (e.g., standard Chrome) version 137 and above no longer support extension loading via this API, due to the removal of the `--load-extension` flag by Chrome. We recommend using Chrome for Testing or Chromium instead. See Cypress Docker image examples for [Chrome for Testing](https://github.com/cypress-io/cypress-docker-images/tree/master/examples/chrome-for-testing) and [Chromium](https://github.com/cypress-io/cypress-docker-images/tree/master/examples/chromium).
118
+
- Electron currently supports only Chrome DevTools extensions.
0 commit comments