externalabstractCookie
Implements
Index
Methods
staticexternalcalled
Creates a
QuestionAdapter
that resolves toCookie
identified byname
.Parameters
externalname: Answerable<string>
Returns QuestionAdapter<Cookie>
staticexternalset
Sets a cookie for the current
Page
. Note thatCookieData
can be either a plain-old JavaScript object, or anAnswerable
WithAnswerableProperties
.Make 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
externalcookieData: Answerable<{ name: Answerable<string>; value: Answerable<string>; domain?: Answerable<string>; path?: Answerable<string>; expiry?: { value: { [toPrimitive]: any; toString: any; toDateString: any; toTimeString: any; toLocaleString: any; toLocaleDateString: any; toLocaleTimeString: any; valueOf: any; getTime: any; getFullYear: any; getUTCFullYear: any; getMonth: any; getUTCMonth: any; getDate: any; getUTCDate: any; getDay: any; getUTCDay: any; getHours: any; getUTCHours: any; getMinutes: any; getUTCMinutes: any; getSeconds: any; getUTCSeconds: any; getMilliseconds: any; getUTCMilliseconds: any; getTimezoneOffset: any; setTime: any; setMilliseconds: any; setUTCMilliseconds: any; setSeconds: any; setUTCSeconds: any; setMinutes: any; setUTCMinutes: any; setHours: any; setUTCHours: any; setDate: any; setUTCDate: any; setMonth: any; setUTCMonth: any; setFullYear: any; setUTCFullYear: any; toUTCString: any; toISOString: any; toJSON: any }; diff: any; plus: any; less: any; isBefore: any; isBeforeOrEqual: any; isAfter: any; isAfterOrEqual: any; toMilliseconds: any; toSeconds: any; toJSON: any; toISOString: any; toString: any; [custom]: any; equals: any }; httpOnly?: Answerable<false> | Answerable<true>; secure?: Answerable<false> | Answerable<true>; sameSite?: Answerable<Lax> | Answerable<Strict> | Answerable<None> }>
Returns Interaction
staticexternaldeleteAll
Creates an interaction to delete all cookies available to the current
Page
..Returns Interaction
externalname
Returns the name of this cookie.
Returns string
externalisPresent
Returns Promise<boolean>
externalvalue
Returns the value of a given cookie.
Returns Promise<string>
externalpath
Returns the path of a given cookie, if any was set.
Returns Promise<string>
externaldomain
Returns the domain of a given cookie, if any was set.
Returns Promise<string>
externalisHttpOnly
Checks if a given cookie is HTTP-only.
Learn more
Returns Promise<boolean>
externalisSecure
Checks if a given cookie is secure.
Learn more
Returns Promise<boolean>
externalexpiry
externalabstractdelete
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
CookieData
Page.cookie