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

EXPECTED OUTPUT

RTILA X PROJECT 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": "wait_for_selector",
      "params": {
        "selector": "css=.h-captcha"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=.hcaptcha-widget"
      }
    },
    {
      "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?