Skip to main content

captcha Scenario 3 — Solve hCaptcha

Written by RTILA X Engineering Team

Intermediate ~6 min
Prerequisites: captcha/1 captcha/2

What You'll Learn

Handle hCaptcha challenges

Real-World Use Case

Working with Cloudflare-protected sites

LIVE DEMO

hCaptcha Challenge

Click the hCaptcha widget, verify, and extract the verified data table.

EXPECTED OUTPUT

hCaptcha Data

field value
Token hk_0e8d9b7c6a5f
Confidence 0.97
Challenge Type Image
Status Verified
RTILA X PROJECT JSON

RTILA X Automation Project

solve-hcaptcha.json
{
  "name": "Solve_hCaptcha",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/captcha/3"
    ],
    "captchaEnabled": true
  },
  "datasets": {
    "hcaptcha_data": {
      "item_selector": "css=table.hcaptcha-data tr",
      "properties": [
        {
          "name": "field",
          "type": "text",
          "selector": "css=td:nth-child(1)"
        },
        {
          "name": "value",
          "type": "text",
          "selector": "css=td:nth-child(2)"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "click",
      "params": {
        "selector": "css=.hcaptcha-widget"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=#hcaptcha-submit"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=.hcaptcha-success"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "hcaptcha_data"
      }
    }
  ]
}

hCaptcha verifies by solving image challenges. The automation clicks the widget, waits for the success indicator, and extracts the protected data.

Did you complete this scenario?

Ready to run this automation?

Copy the project JSON above, open RTILA X, create a new project, and paste it.

This scenario covers 1 RTILA X command and is referenced in 1 learning article.

Continue Learning

Was this helpful?