Skip to content

Commit 64de336

Browse files
inancgumuska3de
authored andcommitted
Add cookie type
1 parent 5bcee0e commit 64de336

File tree

1 file changed

+18
-0
lines changed
  • src/data/markdown/docs/02 javascript api/07 k6-experimental/01 browser/02 BrowserContext

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "Cookie"
3+
excerpt: "Browser module: Cookie Class"
4+
---
5+
6+
Cookie class representing a cookie in the [BrowserContext](/javascript-api/k6-experimental/browser/browsercontext).
7+
8+
| Property | Type | Description |
9+
| -------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
10+
| name | string | The cookie's name. Required. |
11+
| value | string | The cookie's value. Required. |
12+
| domain | string | The cookie's domain. |
13+
| path | string | The cookie's path. Defaults to `'/'`. |
14+
| url | string | The cookie's URL. |
15+
| expires | number | The cookie's expiration date as the number of seconds since the UNIX epoch. Defaults to `-1`, meaning a session cookie. |
16+
| httpOnly | bool | A cookie is inaccessible to the JavaScript [document.cookie](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie) API when this property is `true`. Defaults to `false`. |
17+
| secure | bool | The cookie's secure flag. Defaults to `false`. |
18+
| sameSite | string | The cookie's same site flag. It can be one of `'Strict'`, `'Lax'`, and `'None'`. |

0 commit comments

Comments
 (0)