Lupa API Reference / commands/types / Cookie
Interface: Cookie
Defined in: src/commands/types.ts:135
Shape of a cookie matching Playwright's format.
Use-when
Use when adding cookies via cookies.add or retrieving them via cookies.getAll.
Dont-use-when
Do not use for other storage mechanisms such as LocalStorage or SessionStorage.
Properties
domain?
optionaldomain?:string
Defined in: src/commands/types.ts:154
The domain of the cookie. Either url or both domain and path must be specified.
expires?
optionalexpires?:number
Defined in: src/commands/types.ts:164
Unix time in seconds representing the cookie's expiration.
httpOnly?
optionalhttpOnly?:boolean
Defined in: src/commands/types.ts:169
Whether the cookie is HTTP-only.
name
name:
string
Defined in: src/commands/types.ts:139
The name of the cookie.
path?
optionalpath?:string
Defined in: src/commands/types.ts:159
The path of the cookie. Either url or both domain and path must be specified.
sameSite?
optionalsameSite?:"Lax"|"Strict"|"None"
Defined in: src/commands/types.ts:179
SameSite attribute value.
secure?
optionalsecure?:boolean
Defined in: src/commands/types.ts:174
Whether the cookie is secure (HTTPS-only).
url?
optionalurl?:string
Defined in: src/commands/types.ts:149
The URL associated with the cookie. Either url or both domain and path must be specified.
value
value:
string
Defined in: src/commands/types.ts:144
The value of the cookie.