Use this example to capture browser state after login—including cookies, localStorage, and sessionStorage—so you can debug authentication flows and reuse tokens in downstream steps. This page is intentionally keyword-rich so you can find it by searching for: cookies, localStorage, sessionStorage, browser storage, auth token, state extraction, storage state.Documentation Index
Fetch the complete documentation index at: https://docs.optexity.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This automation:- Logs in to a site (email + password)
- Runs a
stateextraction to capture:page_url,page_titlelocal_storage,session_storagecookies,document_cookie
optexity/examples/login_cookies.json.
Minimal example
After your login interaction steps, add astate extraction node:
Full automation (from login_cookies.json)
What you get back
Thestate extraction appends an OutputData.json_data object with keys:
| Key | Description |
|---|---|
page_url | Current page URL |
page_title | Current page title |
local_storage | All localStorage key/value pairs |
session_storage | All sessionStorage key/value pairs |
cookies | Cookies from the current browser context |
document_cookie | document.cookie for the current page |
When to use this
| Goal | Why this helps |
|---|---|
| Debug login issues | Confirm if the app uses cookies vs localStorage/sessionStorage tokens |
| Capture tokens for API calls | Many apps store auth tokens in localStorage/sessionStorage |
| Validate you landed on the right page | page_url and page_title confirm navigation after login |