save_auth_profile
Save authentication profiles for test runs using environment variables, browser storage state, or cookie JSON files, enabling reusable login configurations.
Instructions
Save an authentication profile for use in test runs.
Args: profile_name: Unique name for this profile auth_type: One of "env_login", "storage_state", or "cookie_json" login_url: Login page URL (required for env_login) username_env: Name of env var holding the username (default: TEST_USERNAME) password_env: Name of env var holding the password (default: TEST_PASSWORD) storage_state_path: Path to a Playwright storage_state.json file cookie_json_path: Path to a JSON file containing cookie objects user_data_dir: Optional path to a persistent Chromium profile directory (helps with anti-bot OAuth)
Returns: dict with profile_name, auth_type, status, note
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth_type | Yes | ||
| login_url | No | ||
| password_env | No | TEST_PASSWORD | |
| profile_name | Yes | ||
| username_env | No | TEST_USERNAME | |
| user_data_dir | No | ||
| cookie_json_path | No | ||
| storage_state_path | No |