playwright-community / playwright-go

Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.
https://playwright-community.github.io/playwright-go/
MIT License
1.94k stars 144 forks source link

Secured Cookies #430

Closed dbelozerovx1 closed 1 month ago

dbelozerovx1 commented 3 months ago

Is there any way to retrieve secured cookies, i can grab cookies stored in context.StorageState, which also has secure(bool) flag but it doesnt make sense if only non-secured cookies are shown, did i mess up somewhere? it just doesnt shown, works on every website with cookie based auth

upd: a bit not clear, my bad, cookies like sessionid, authcode, etc... anything that website is using for cookie based auth not shown in playwright instance, but with my regular browser i can spot it with zero problems

canstand commented 2 months ago

browserContext.Cookies() can get all cookies, include secure cookie. But there is an edge case in my test, webkit only works when using https.