-
Notifications
You must be signed in to change notification settings - Fork 41
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
Extend roadmap: cookies #423
Conversation
The big practical question for cookies is how to handle double keyed cookies (maybe more generally multi-keyed cookies) i.e. situations where the cookies sent depend both on the origin of the request and the origin of the request source. Current WebDriver entirely punts on this issue and just says "return the entire content of the cookie store", without any way to tell which cookies will actually apply to a given request, or set the key for cookies. |
TODO: allow cross-origin cookies access |
For my own understanding: is this only about @OrKoN How does CDP handle this, if at all? CDP’s |
@mathiasbynens we should probably be using https://chromedevtools.github.io/devtools-protocol/tot/Storage/#method-getCookies which has partition keys (I assume that it is used for double-keying?) |
See https://hacks.mozilla.org/2021/02/introducing-state-partitioning/ for example. Basically it means that cookies are keyed not just on the destination origin (e.g. Also, at least in Gecko, we have the concept of containers, which are used as an additional key for storage. It's unclear to me how we want this to work for WebDriver. For example if we want a feature to partition storage between different tests, using containers for that partitioning makes sense. But then should getting cookies return cookies for all containers, or require specifying which container to use? This might also apply to WebKit/Safari's profiles; I'm not sure (it doesn't apply to Firefox profiles because there's a 1:1 relationship between a browser process and a profile, but 1:many between a browser process and containers). |
Hi @sadym-chromium, just wanted to know if you're waiting for anything in particular to get this merged? Since work on cookies is being discussed & definitely going to happen, it'd be good to have this in the main roadmap. |
@lolaodelola FYI Maksim is on leave. You may want to reach out to @mathiasbynens privately in the meantime to discuss the next steps. |
I’ve marked the PR as ready for review now. I agree it would make sense to merge this in some form, since we already agreed that this is important and happening. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % suggestion to make scenario a bit more specific.
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
roadmap.md
Outdated
@@ -93,7 +93,7 @@ This scenario loads a web page and prints it as a PDF. In spec terms, this invol | |||
|
|||
### Cookies | |||
|
|||
This scenario loads a web page and gets and sets its cookies. In spec terms, this involves: | |||
This scenario loads a web page, reads the cookies set by the server and the page, updates and deletes some of the cookies, and triggers an action to verify that modified cookies are processed correctly. In spec terms, this involves: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't cover cookies for pages that aren't loaded. My understanding is that the need to load a page before interacting with its cookies is considered a significant limitation for WebDriver. It's also the source of much of the complexity here (since having a page loaded in a specific context answers a lot of the questions around keying, given that a particular browsing context will have a particular storage key).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggested edit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this addressed by the edit that happened after this comment was posted?
Co-authored-by: jgraham <james@hoppipolla.co.uk>
SHA: c10c304 Reason: push, by mathiasbynens Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
No description provided.