Cookie parameter object used to set cookies in the page-level cookies API.
export interface CookieParam
Property | Modifiers | Type | Description | Default |
---|---|---|---|---|
domain | `optional` | string | Cookie domain. | |
expires | `optional` | number | Cookie expiration date, session cookie if not set | |
httpOnly | `optional` | boolean | True if cookie is http-only. | |
name | string | Cookie name. | ||
partitionKey | `optional` | [CookiePartitionKey](./puppeteer.cookiepartitionkey.md) \| string | Cookie partition key. In Chrome, it matches the top-level site the partitioned cookie is available in. In Firefox, it matches the source origin in the [PartitionKey](https://w3c.github.io/webdriver-bidi/#type-storage-PartitionKey). | |
path | `optional` | string | Cookie path. | |
priority | `optional` | [CookiePriority](./puppeteer.cookiepriority.md) | Cookie Priority. Supported only in Chrome. | |
sameParty | `optional` | boolean | True if cookie is SameParty. Supported only in Chrome. | |
sameSite | `optional` | [CookieSameSite](./puppeteer.cookiesamesite.md) | Cookie SameSite type. | |
secure | `optional` | boolean | True if cookie is secure. | |
sourceScheme | `optional` | [CookieSourceScheme](./puppeteer.cookiesourcescheme.md) | Cookie source scheme type. Supported only in Chrome. | |
url | `optional` | string | The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, and source scheme values of the created cookie. | |
value | string | Cookie value. |