
Ethan Collins
Pattern Recognition Specialist

capsolver-core exposes create_capsolver, detect, get_captcha_info, solve, and solve_on_page; browser methods require the Playwright extra.The reliable way to implement playwright recaptcha v3 is to pause the permitted browser task at the verification checkpoint, recover inside the same Playwright page, and resume only after the original action passes its own assertion. CapSolver provides the official capsolver-core browser pipeline for detection, parameter reading, solving, and fill-back. Playwright remains responsible for navigation, form state, credentials, and test assertions. This separation avoids stale tokens and ambiguous outcomes. It also keeps the automation lawful and reviewable: a CAPTCHA capability does not grant permission to access private, restricted, sensitive, or unauthorized data. The example below uses only current CapSolver APIs and gives each call a defined input, output, and stop condition.
Install the official core package with Playwright support, then install Chromium:
pip install "capsolver-core[playwright] @ git+https://github.com/capsolver-ai/capsolver-core.git"
playwright install chromium
The CapSolver core SDK documents this installation and the browser methods. The AI-agent overview confirms that the agent layer covers reCAPTCHA v3, while the agent tools interface and MCP service show alternative adapters for model-driven stacks.
The official solve_on_page path is the clearest playwright recaptcha v3 example because it uses the live Playwright page:
import asyncio
import os
from capsolver_core import create_capsolver
from playwright.async_api import async_playwright
async def main():
cap = create_capsolver(
api_key=os.environ["CAPSOLVER_API_KEY"],
default_timeout=120,
polling_interval=5,
)
async with async_playwright() as p:
browser = await p.chromium.launch()
page = await browser.new_page()
await page.goto("https://staging.example.org/authorized-form")
detected = await cap.detect(page)
if not detected:
raise RuntimeError("Stop: no CAPTCHA detected")
results = await cap.solve_on_page(page)
if not results or any(r.error or not r.filled for r in results):
raise RuntimeError("Stop: CAPTCHA recovery did not complete")
await page.get_by_role("button", name="Submit").click()
await page.wait_for_url("**/confirmation")
await browser.close()
asyncio.run(main())
The input is one authorized page plus the API key. detect outputs a list of CAPTCHA types. solve_on_page outputs SolveOnPageResult items containing info, solution, filled, and error. The stop conditions are no detection, any error, an unfilled result, a changed host, or a missing confirmation. The Playwright Page API documents page navigation and assertions, while the reCAPTCHA v3 action model explains why the site owner must verify the action.
An implementation of playwright recaptcha v3 must not let the script invent or change the protected action. Record the expected action before navigation and compare the final application response against that contract. Keep thresholds and backend risk decisions in site-owned code. The browser should receive only an accepted, rejected, or review outcome.
The Playwright reCAPTCHA failure diagnosis helps distinguish an action mismatch from a browser-state problem. The reCAPTCHA score explanation provides background for owners of the protected application, and the reCAPTCHA v3 error workflow is useful when a permitted agent integration repeatedly reaches review.
Redeem Your CapSolver Bonus Code
Boost your automation budget instantly!
Use bonus code CAP26 when topping up your CapSolver account to get an extra 5% bonus on every recharge — with no limits.
Redeem it now in your CapSolver Dashboard
A playwright recaptcha v3 test should preserve the Playwright trace, approved hostname, action name, page-state transition, CapSolver request identifier, and terminal result. Do not store cookies, credentials, or raw solution values in reports. The Playwright Trace Viewer can show the exact point where the checkpoint appeared, and the W3C Trace Context model helps correlate browser and service events.
Use one autonomous recovery attempt. A second checkpoint, missing callback, detached frame, navigation to a new host, or unchanged form state must terminate the playwright recaptcha v3 run. This makes retry behavior observable instead of open-ended.
Run a positive staging case, wrong action, expired page, missing key, unsupported page state, interrupted network call, and repeated challenge. The positive case must reach the exact confirmation route. Negative cases must stop before another submission. The existing Playwright reCAPTCHA solver workflow can serve as the broader integration hub when diagnosing parameter drift.
A production playwright recaptcha v3 workflow keeps the browser context stable, uses the official capsolver-core methods, validates the v3 action at the application boundary, and stops on the first ambiguous state. The goal is not a returned tool result; it is the permitted Playwright task reaching a deterministic assertion. Teams testing systems they operate or are authorized to test can evaluate CapSolver for this recovery layer.
No. A Playwright-only workflow can use capsolver-core directly. capsolver-agent and capsolver-mcp are adapters for agent frameworks and MCP clients.
It returns a list of results with CAPTCHA information, a solution when successful, a filled flag, and an error field.
Assert the original authorized application's expected URL, form state, or response in the same browser context.
No. Use it only for lawful, reasonable, responsible automation on systems and data you are authorized to access.
Follow this Make reCAPTCHA solver tutorial to build a CapSolver HTTP scenario with createTask, getTaskResult, retry branches, and verification.

A Cursor reCAPTCHA v2 solver is safest when Cursor calls a narrow MCP tool instead of asking the model to improvise browser steps. CapSolver provides that shape through `capsolver-mcp`, which exposes solving capabilities as discoverable Model Context Protocol tools. The practical setup is straightforward: install `capsolver-core`, install `capsolver-mcp`, add the server to Cursor, and choose token mode or browser mode depending on the workflow. This guide rewrites the common
