save_auth
Log into web applications and save authentication sessions to JSON for screen-reader analysis of protected content. Executes login steps, captures cookies and localStorage, enabling accessibility testing on authenticated pages.
Instructions
Authenticate with a web application and save the session for subsequent analysis. Navigates to the URL, executes login steps (click a button, fill a form, etc.), waits for the authenticated page to load, then saves cookies and localStorage to a JSON file. Overwrites the output file if it already exists.
Side effects: Writes a storageState JSON file to disk at outputPath. Launches a headed browser that interacts with the page (clicks, fills inputs). Not needed for public pages — only use when content is behind authentication.
Pass the output file path as storageState to analyze_url, trace_path, or analyze_pages to analyze authenticated content.
Steps format: Array of actions to perform in order. Each step is an object:
{ click: 'button text or selector' }— click a button/link{ fill: ['input selector', 'value'] }— fill an input field{ wait: 2000 }— wait N milliseconds{ waitForUrl: '/dashboard' }— wait until URL contains this string
Example for a dev login: steps: [{ click: 'Dev Login' }, { waitForUrl: '/workspace' }]
Example for form login: steps: [{ fill: ['#email', 'user@test.com'] }, { fill: ['#password', 'pass'] }, { click: 'Sign In' }, { waitForUrl: '/dashboard' }]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Login page URL | |
| steps | Yes | Login steps to execute (see description for format) | |
| outputPath | No | File path to save the storageState JSON | tactual-auth.json |
| timeout | No | Timeout per step in ms |