java.lang.Object
net.serenitybdd.screenplay.playwright.interactions.AddCookieBuilder
All Implemented Interfaces:
net.serenitybdd.core.SkipNested, net.serenitybdd.screenplay.Performable

public class AddCookieBuilder extends Object implements net.serenitybdd.screenplay.Performable
Builder for creating a cookie with various options.
  • Method Details

    • forDomain

      public AddCookieBuilder forDomain(String domain)
      Set the domain for the cookie.
    • withPath

      public AddCookieBuilder withPath(String path)
      Set the path for the cookie.
    • expiresAt

      public AddCookieBuilder expiresAt(double timestamp)
      Set the expiration time as Unix timestamp in seconds.
    • httpOnly

      public AddCookieBuilder httpOnly()
      Mark the cookie as HTTP-only.
    • secure

      public AddCookieBuilder secure()
      Mark the cookie as secure.
    • sameSite

      public AddCookieBuilder sameSite(String sameSite)
      Set the SameSite attribute (Strict, Lax, or None).
    • performAs

      public <T extends net.serenitybdd.screenplay.Actor> void performAs(T actor)
      Specified by:
      performAs in interface net.serenitybdd.screenplay.Performable