mcpbeat Sign in

Testdriver:captcha Agent Skill

Solve captchas using 2captcha service

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
237
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/testdriverai/testdriverai --skill testdriver:captcha

The instruction itself

14 sections, as written by the author

<!-- Generated from captcha.mdx. DO NOT EDIT. -->

Captcha Solving

TestDriver can automatically solve captchas during your tests using the 2captcha service. This feature works on both Linux and Windows sandboxes.

Quick Start

const result = await testdriver.captcha({
  apiKey: process.env.TWOCAPTCHA_API_KEY,
});

console.log(result.success); // true
console.log(result.token);   // The solved captcha token

That's it! TestDriver will automatically:

  • Detect the captcha type on the page
  • Extract the sitekey
  • Solve the captcha via 2captcha
  • Inject the token into the page
  • Trigger any callbacks

Supported Captcha Types

| Type | Auto-Detected | Notes |

|------|---------------|-------|

| reCAPTCHA v2 | ✅ | Including invisible |

| reCAPTCHA v3 | ✅ | Action is auto-detected |

| hCaptcha | ✅ | |

| Cloudflare Turnstile | ✅ | |

Getting a 2captcha API Key

  • Sign up at 2captcha.com
  • Add funds to your account
  • Copy your API key from the dashboard

Configuration Options

const result = await testdriver.captcha({
  // Required
  apiKey: '2CAPTCHA_API_KEY',

  // Optional - usually auto-detected
  sitekey: '6Le...',           // Override auto-detected sitekey
  type: 'recaptcha_v3',        // Override auto-detected type
  action: 'submit',            // reCAPTCHA v3 action

  // Timing
  timeout: 120000,             // Max wait time (default: 120s)
  pollInterval: 5000,          // Poll interval (default: 5s)
});

Full Example

import { describe, expect, it } from "vitest";
import { TestDriver } from "testdriver";

describe("Checkout flow", () => {
  it("should complete checkout with captcha", async (context) => {
    const testdriver = TestDriver(context);

    // Navigate to checkout page
    await testdriver.provision.chrome({
      url: 'https://example.com/checkout',
    });

    // Fill out form
    await testdriver.type({ text: 'John Doe', selector: '#name' });
    await testdriver.type({ text: '[email protected]', selector: '#email' });

    // Solve the captcha
    const result = await testdriver.captcha({
      apiKey: process.env.TWOCAPTCHA_API_KEY,
    });

    expect(result.success).toBe(true);

    // Submit the form
    await testdriver.click({ selector: '#submit' });

    // Verify success
    await testdriver.find({ text: 'Order confirmed' });
  }, 180000);
});

Environment Variables

You can set your API key as an environment variable:

export TWOCAPTCHA_API_KEY=your_api_key_here

Then use it in your tests:

const result = await testdriver.captcha({
  apiKey: process.env.TWOCAPTCHA_API_KEY,
});

GitHub Actions

Add the key to your repository secrets and expose it in your workflow:

- name: Run Tests
  run: vitest run
  env:
    TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}

How It Works

  • Detection: Scans the page for captcha elements (data-sitekey, script tags, etc.)
  • Submit: Sends the captcha challenge to 2captcha's solving service
  • Poll: Waits for human solvers to complete the captcha
  • Inject: Injects the solved token into the page's hidden fields
  • Callback: Triggers any JavaScript callbacks the page expects

Troubleshooting

"Could not auto-detect captcha"

The captcha element wasn't found on the page. Try:

  • Waiting for the page to fully load before calling captcha()
  • Providing the sitekey and type manually

Timeout errors

Captcha solving typically takes 10-30 seconds. If you're getting timeouts:

  • Increase the timeout option
  • Check your 2captcha balance
  • Verify the captcha type is correct

Token not working

Some sites validate tokens immediately. Make sure:

  • The token is injected before form submission
  • The captcha type matches what the site expects
  • For reCAPTCHA v3, the action parameter matches the site's expected action

Requirements

  • Chrome must be launched with remote debugging enabled (automatic on all sandboxes)
  • A valid 2captcha API key with sufficient balance

Other skills for the same job

different authors, same section of the catalogue
Protocolsio Integration
by christophacham
×4

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.

16k tokens
Tailored Resume Generator
by frostant
×4

Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances

3k tokens
Excalidraw Diagram Generator
by github
vendor ×3

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

36k tokens scripts
Expo Dev Client
by openai
vendor ×3

Build and distribute Expo development clients locally or via TestFlight

961 tokens
Executing Plans
by ZhanlinCui
×3

Use when you have a written implementation plan to execute in a separate session with review checkpoints

542 tokens
Anndata
by christophacham
×3

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

16k tokens
Benchling Integration
by christophacham
×3

Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.

14k tokens
Biopython
by christophacham
×3

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

24k tokens

How to use it

Copy the folder

Take testdriverai/testdriver:captcha from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.