This repository has been archived by the owner on Jan 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
ka3de
previously approved these changes
Aug 24, 2023
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.
ka3de
reviewed
Aug 24, 2023
ankur22
previously approved these changes
Aug 24, 2023
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 👍
ka3de
approved these changes
Aug 25, 2023
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.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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