Package com.microsoft.playwright.options
Class Cookie
- java.lang.Object
-
- com.microsoft.playwright.options.Cookie
-
public class Cookie extends Object
-
-
Field Summary
Fields Modifier and Type Field Description String
domain
For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com".Double
expires
Unix time in seconds.Boolean
httpOnly
Optional.String
name
String
path
Either url or domain / path are required Optional.SameSiteAttribute
sameSite
Optional.Boolean
secure
Optional.String
url
Either url or domain / path are required.String
value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cookie
setDomain(String domain)
For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com".Cookie
setExpires(double expires)
Unix time in seconds.Cookie
setHttpOnly(boolean httpOnly)
Optional.Cookie
setPath(String path)
Either url or domain / path are required Optional.Cookie
setSameSite(SameSiteAttribute sameSite)
Optional.Cookie
setSecure(boolean secure)
Optional.Cookie
setUrl(String url)
Either url or domain / path are required.
-
-
-
Field Detail
-
name
public String name
-
value
public String value
-
url
public String url
Either url or domain / path are required. Optional.
-
domain
public String domain
For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either url or domain / path are required. Optional.
-
path
public String path
Either url or domain / path are required Optional.
-
expires
public Double expires
Unix time in seconds. Optional.
-
httpOnly
public Boolean httpOnly
Optional.
-
secure
public Boolean secure
Optional.
-
sameSite
public SameSiteAttribute sameSite
Optional.
-
-
Method Detail
-
setDomain
public Cookie setDomain(String domain)
For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either url or domain / path are required. Optional.
-
setExpires
public Cookie setExpires(double expires)
Unix time in seconds. Optional.
-
setHttpOnly
public Cookie setHttpOnly(boolean httpOnly)
Optional.
-
setSecure
public Cookie setSecure(boolean secure)
Optional.
-
setSameSite
public Cookie setSameSite(SameSiteAttribute sameSite)
Optional.
-
-