abstractCookie
Implements
- Optional
Index
Methods
staticcalled
Creates a QuestionAdapter that resolves to Cookie identified by
name
.Parameters
name: Answerable<string>
Returns QuestionAdapter<Cookie>
staticset
Sets a cookie for the current Page. Note that CookieData can be either a plain-old JavaScript object, or an Answerable WithAnswerableProperties.
infoMake sure that the actor performing this interaction is on the page that should receive the cookie. Because of browser security restrictions, an actor canβt set a cookie for an arbitrary page without being on that page.
Parameters
cookieData: Answerable<{ name: Answerable<string>; value: Answerable<string>; domain?: Answerable<string>; path?: Answerable<string>; expiry?: { readonly value: { toString: {}; toDateString: {}; toTimeString: {}; toLocaleString: {}; toLocaleDateString: {}; toLocaleTimeString: {}; valueOf: {}; getTime: {}; getFullYear: {}; getUTCFullYear: {}; getMonth: {}; ... 32 more ...; [Symbol.toPrimitive]: {}; }; ... 12 more ...; equals: {}; }; httpOnly?: Answerable<false> | Answerable<true>; secure?: Answerable<false> | Answerable<true>; sameSite?: Answerable<Lax> | Answerable<Strict> | Answerable<None> }>
Returns Interaction
staticdeleteAll
Creates an interaction to delete all cookies available to the current Page..
Returns Interaction
name
Returns the name of this cookie.
Returns string
isPresent
Returns Promise<boolean>
value
Returns the value of a given cookie.
Returns Promise<string>
path
Returns the path of a given cookie, if any was set.
Returns Promise<string>
domain
Returns the domain of a given cookie, if any was set.
Returns Promise<string>
isHttpOnly
Checks if a given cookie is HTTP-only.
Learn more
Returns Promise<boolean>
isSecure
Checks if a given cookie is secure.
Learn more
Returns Promise<boolean>
expiry
Returns Promise<Timestamp>
abstractdelete
Deletes a given cookie.
Returns Promise<void>
A Screenplay Pattern-style model responsible for managing cookies available to the current Page.
Checking if a cookie exists
Setting a cookie
Reading a cookie
Learn more