Set a cookie
browser_set_cookieCreate or replace a single browser cookie with scoped domain, path, expiry, and security flags, then verify the stored value with browser_get_cookies.
Instructions
Create or replace one cookie (BiDi storage.setCookie). domain and path scope it; omit domain for a host-only cookie. Use browser_get_cookies afterwards to confirm the value and expiry the browser actually stored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Cookie name | |
| path | No | Cookie path (default "/") | |
| value | Yes | Cookie value | |
| domain | Yes | Cookie domain, e.g. "127.0.0.1" | |
| secure | No | Mark the cookie Secure | |
| httpOnly | No | Mark the cookie HttpOnly | |
| sameSite | No | SameSite policy | |
| expirySeconds | No | Expiry as a Unix timestamp in seconds |