# Captcha Authentication

Use this page when your login form contains a simple text-based captcha that must be solved before the form can be submitted.

For reCAPTCHA, hCaptcha, and Cloudflare Turnstile, configure IP allowlisting for Escape's Public Locations so the scanner can reach the login form. Automatic captcha solving covers simple text captchas. See [Firewall Configuration](<https://docs.escape.tech/documentation/platform/firewall/index.md>).

## How It Works

The `solve_captcha` browser action captures the page, reads the captcha text with AI vision, and fills the extracted text into the input field selected by `locator`.

Submit the form with a later `click` action, or set `auto_submit: true`.

## Browser Actions Example

```yaml
presets:
  - type: browser_actions
    login_url: https://example.com/login
    users:
      - username: user@example.com
        actions:
          - action: fill
            locator: input[name="username"]
            value: user@example.com
          - action: fill
            locator: input[name="password"]
            value: password123
          - action: solve_captcha
            locator: input[name="captcha"]
            auto_submit: false
          - action: click
            locator: button[type="submit"]
```

## Action Reference

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `action` | `solve_captcha` | yes | `solve_captcha` | Action identifier |
| `locator` | `string` | yes |  | [Playwright locator](<https://playwright.dev/docs/api/class-page#page-locator>) of the input field |
| `auto_submit` | `boolean` | no | `false` | Submit the form automatically after the captcha is filled |
| `allow_failure` | `boolean` | no | `false` | Allow this action to fail without breaking authentication |

## Related Documentation

- [Multi-Factor Authentication](<https://docs.escape.tech/documentation/platform/authentication/multi-factor-authentication/index.md>): Authenticator-app and email verification codes
- [Browser Actions](<https://docs.escape.tech/documentation/platform/authentication/browseractions/index.md>): Full reference for browser actions
- [Firewall Configuration](<https://docs.escape.tech/documentation/platform/firewall/index.md>): IP allowlisting for captcha bypasses
- [Agentic Mode](<https://docs.escape.tech/documentation/platform/authentication/agentic-browser/index.md>): AI-driven browser authentication
