cookie_set
Set browser cookies with specified domain, value, and flags. Choose expires_days to persist login sessions across browser restarts or keep cookies session-only for ephemeral use.
Instructions
Set a cookie. IMPORTANT: with expires_days=0 this creates a SESSION cookie, which Firefox keeps in memory only — it is gone after browser_close even though the profile itself persists. Pass expires_days (e.g. 30) to write a login session that survives a relaunch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | No | / | |
| value | Yes | ||
| domain | Yes | ||
| secure | No | Set the Secure flag (HTTPS only). Required when same_site='None'. | |
| http_only | No | Set the HttpOnly flag (hides it from page JS, like a real auth cookie). | |
| same_site | No | Lax | |
| expires_days | No | Lifetime in days. 0 = session cookie (dies with the browser). |