StrikekitStrikekit

set cookie

Set a browser cookie scoped to the current page URL

Set a cookie on the browser context, scoped to the URL of the current page. Navigate first so the cookie has a page URL to attach to.

Syntax

When I set cookie "<name>" to "<value>"

Qualifiers

QualifierRoleExample
toCookie valueset cookie "session" to "abc"

Examples

Given I navigate to "https://example.com"
When I set cookie "session" to "abc123"

Notes

  • Quoted values resolve like every other step ($ENV, @ / @@, {{faker}}). Reports keep the raw .stk quote.
  • Useful to skip login flows when you already have a session cookie.
  • Web only. Appium / Platform: api return unsupported.

On this page