Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Electron #46

Closed
Romiko opened this issue Dec 29, 2020 · 2 comments · Fixed by #151
Closed

Support for Electron #46

Romiko opened this issue Dec 29, 2020 · 2 comments · Fixed by #151
Assignees
Labels
Priority: low Type: enhancement New feature or request.

Comments

@Romiko
Copy link

Romiko commented Dec 29, 2020

Hi,
Please add support for Electron browser.

Thx

@derevnjuk derevnjuk added the Type: enhancement New feature or request. label Apr 4, 2021
@derevnjuk derevnjuk self-assigned this Apr 4, 2021
@kpittman-securus
Copy link

kpittman-securus commented Apr 13, 2021

Please let me know if there is anything I can do to help get this implemented!

I just found out about this plugin, and we desperately need this during our CI runs (which are on Electron).

Even though Cypress has videos and screenshots, some of our setup code fails during before hooks, and the Cypress logs don't say why. Since we are doing API calls during this phase, there's nothing shown in the video or screenshots.

It would be absolutely IDEAL for us to be able to download a HAR and debug that way, but it would have to work in Electron.

Also, it would be ideal if the record/save commands were able to work from within on('before:spec') and on('after:spec') Cypress event hooks. When I try it, it says cy is not defined. Is there a workaround way to call this without using cy?

@derevnjuk derevnjuk pinned this issue Jan 6, 2023
derevnjuk added a commit that referenced this issue Jan 15, 2023
To make the plugin work with Electron, you just need to set the `remote-debugging-port` option when you launch Cypress as follows:

```bash
$ ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=9222 cypress run --browser electron
```

Please refer to the [Electron documentation](https://www.electronjs.org/docs/latest/api/command-line-switches#--remote-debugging-portport) and the [Cypress documentation](https://docs.cypress.io/api/plugins/browser-launch-api#Modify-Electron-app-switches) for more information on how to properly configure this switch.

closes #46
@derevnjuk
Copy link
Member

To make the plugin work with Electron, you just need to set the --remote-debugging-port switch while running Cypress tests as follows:

$ ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=9222 cypress run --browser electron

For details please refer to #151. Support for this switch has been implemented since version 5.11.0, which can be found in the release notes on our Github repository at https://github.com/NeuraLegion/cypress-har-generator/releases/tag/v5.11.0

derevnjuk added a commit that referenced this issue Jan 15, 2023
To make the plugin work with Electron, you just need to set the `remote-debugging-port` option when you launch Cypress as follows:

```bash
$ ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=9222 cypress run --browser electron
```

Please refer to the [Electron documentation](https://www.electronjs.org/docs/latest/api/command-line-switches#--remote-debugging-portport) and the [Cypress documentation](https://docs.cypress.io/api/plugins/browser-launch-api#Modify-Electron-app-switches) for more information on how to properly configure this switch.

closes #46
derevnjuk added a commit that referenced this issue Jan 15, 2023
To make the plugin work with Electron, you just need to set the
`remote-debugging-port` option when you launch Cypress as follows:

```bash
$ ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=9222 cypress run --browser electron
```

Please refer to the [Electron
documentation](https://www.electronjs.org/docs/latest/api/command-line-switches#--remote-debugging-portport)
and the [Cypress
documentation](https://docs.cypress.io/api/plugins/browser-launch-api#Modify-Electron-app-switches)
for more information on how to properly configure this switch.

closes #46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: low Type: enhancement New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants