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
Unfortunately in the environment where I'm running my tests, I'm not able to pass the CLI flag, and ideally I'd be able to use the cypress browser launch API.
@afsmith92 thanks for contributing. Unfortunately, Cypress currently has limitations that prevent this feature from being implemented. Cypress ignores the switcher passed via launch options. This means that even if you try to modify the launchOptions.args array to include --remote-debugging-port=9222, Cypress will not recognize it. According to the Cypress documentation, you have to use the env variable: https://docs.cypress.io/api/plugins/browser-launch-api#Modify-Electron-app-switches
Additionally, there is a bug in Cypress starting from v12.12.0 that prevents overriding the port. This bug is described in issue #288, it also restricts the ability to modify the port for Electron.
So, you may need to consider alternative approaches or workarounds in your testing environment to achieve your desired outcome.
Description
As documented in the readme, using this plugin with Electron requires passing CLI arguments
$ ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=9222 cypress run --browser electron
Is there a reason or limitation why this flag couldn't optionally be passed in via the cypress browser launch API instead?
Unfortunately in the environment where I'm running my tests, I'm not able to pass the CLI flag, and ideally I'd be able to use the cypress browser launch API.
Possible solution
Currently the plugin checks if the CLI argument is present -- this check would need to be relaxed.
The text was updated successfully, but these errors were encountered: