-
Notifications
You must be signed in to change notification settings - Fork 42
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
Retrieve all cookies #1005
Retrieve all cookies #1005
Conversation
f88d20b
to
87f2812
Compare
3bc107f
to
d85fffe
Compare
d85fffe
to
2e06da8
Compare
2e06da8
to
098b7ef
Compare
We can use this type in our code and tests and pass to clients. The network.Cookie contains an internal fields and we don't want to use it. This type provides type safety and representation. Instead of a map type which its fields are of the same type, not type-safe, and not useful or effective for representing a concept like a cookie. Declaring this in the api package. So we can have less verbosity in the rest of the codebase. The downside is the api package dependency. If we declared this in the common package, there would be circular dependency issues.
We take the cookies from the browser using CDP and then converting them to our own cookie format: api.Cookie.
3a8b73a
to
7add7d1
Compare
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 is great! 👏 I was just wondering where is the URLs filter, but I see this is just a part of #6.
LGTM.
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 👏 Nicely done 🙂
I only left minor comments for you to consider 👍
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.
What?
Adds
browserContext.cookies()
support.There will be another PR to add
browserContext.cookies([urls])
support to filter by cookie URLs.Why?
Checklist
The docs will be updated when #6 finishes.
Related PR(s)/Issue(s)
Updates #6