[FEATURE] Cookies not supported with Electron
See original GitHub issueI’m using Playwright to run end-to-end tests for an Electron app. I have a use case for cookies, but it appears none of the cookies commands exist on the BrowserContext with Electron.
I assumed they would have the same API, but upon trying to get cookies:
const context = await app.context()
await context.cookies()
I get this error:
browserContext.cookies: Protocol error (Storage.getCookies): Browser context management is not supported.
Is cookies not supported for Electron + Playwright, or is there a workaround?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Cookies module not working in Electron app - Stack Overflow
The electron-cookies package it is meant to be used in the renderer process, you're attempting to use it in the main/browser process. In...
Read more >Send cookies in Electron + React app - Coding Out Loud
In this article I discuss using cookies to make an authenticated web call to an external ... import electron from 'electron'; function ......
Read more >Class: Cookies | Electron
Query and modify a session's cookies. Process: Main This class is not exported from the 'electron' module. It is only available as a...
Read more >Set Cookie doesn't work in new BrowserWindow : r/electronjs
I want to set a new 'Cookie' for a new BrowserWindow that I create inside the app, it is not the main app...
Read more >Create a Todo List app with Electron, JavaScript and AG Grid
No Node-specific code is allowed. To communicate between processes (e.g., to handle data transfer or invoke native functionality from the UI), ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@taniarascia Indeed, some feature are not working with Electron, that’s why it is still experimental 😄 I don’t think there is an easy workaround today.
upvote for electron support!