Skip to main content

captcha Scenario 2 — Solve Cloudflare Turnstile

Written by RTILA X Engineering Team

Beginner ~4 min

What You'll Learn

Detect a captcha before attempting to solve

Real-World Use Case

Avoiding unnecessary solving attempts

LIVE DEMO

Cloudflare Turnstile Challenge

Click the Turnstile widget, verify, and unlock the session table.

EXPECTED OUTPUT

Turnstile Data

field value
Session ID SES-4482
IP Address 203.0.113.45
Access Level Full
RTILA X PROJECT JSON

RTILA X Automation Project

solve-cloudflare-turnstile.json
{
  "name": "Solve_Cloudflare_Turnstile",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/captcha/2"
    ],
    "captchaEnabled": true
  },
  "datasets": {
    "turnstile_data": {
      "item_selector": "css=table.turnstile-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=.turnstile-widget"
      }
    },
    {
      "command": "click",
      "params": {
        "selector": "css=#turnstile-submit"
      }
    },
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=.turnstile-success"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "turnstile_data"
      }
    }
  ]
}

Cloudflare Turnstile is handled similarly to reCAPTCHA. A click on the widget solves the challenge and unlocks the protected table.

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 2 RTILA X commands and is referenced in 1 learning article.

Continue Learning

Was this helpful?