Open source


Cookie class represents a cookie in the BrowserContext.

See the HTTP Cookies documentation on the Mozilla website for more details about cookies.

namestring""The cookie’s name. Required.
valuestring""The cookie’s value. Required.
domainstring""The cookie’s domain.
pathstring'/'The cookie’s path.
urlstring""The cookie’s URL.
expiresnumber-1The cookie’s expiration date as the number of seconds since the UNIX epoch. -1 means a session cookie.
httpOnlyboolfalseA cookie is inaccessible to the JavaScript document.cookie API when this property is true.
secureboolfalseThe cookie’s secure flag.
sameSitestring'Lax'The cookie’s same site flag. It can be one of 'Strict', 'Lax', and 'None'.