Dictionary representation of cookies for `SessionCookies.set` method.
| 15 | |
| 16 | @docs_group('Session management') |
| 17 | class CookieParam(TypedDict, total=False): |
| 18 | """Dictionary representation of cookies for `SessionCookies.set` method.""" |
| 19 | |
| 20 | name: Required[str] |
| 21 | """Cookie name.""" |
| 22 | |
| 23 | value: Required[str] |
| 24 | """Cookie value.""" |
| 25 | |
| 26 | domain: NotRequired[str] |
| 27 | """Domain for which the cookie is set.""" |
| 28 | |
| 29 | path: NotRequired[str] |
| 30 | """Path on the specified domain for which the cookie is set.""" |
| 31 | |
| 32 | secure: NotRequired[bool] |
| 33 | """Set the `Secure` flag for the cookie.""" |
| 34 | |
| 35 | http_only: NotRequired[bool] |
| 36 | """Set the `HttpOnly` flag for the cookie.""" |
| 37 | |
| 38 | expires: NotRequired[int] |
| 39 | """Expiration date for the cookie, None for a session cookie.""" |
| 40 | |
| 41 | same_site: NotRequired[Literal['Lax', 'None', 'Strict']] |
| 42 | """Set the `SameSite` attribute for the cookie.""" |
| 43 | |
| 44 | |
| 45 | class PlaywrightCookieParam(TypedDict, total=False): |
no outgoing calls