Runnable examples for CapSolver Agent's Playwright-backed detect_captchas and solve_on_page tools.
Examples only: this repository does not publish
playwright-capsolveror duplicate the browser engine.
The shared capsolver-agent tool executor delegates browser work to capsolver-core. This repository demonstrates those public tools and keeps solving opt-in.
git clone https://github.com/capsolver-ai/playwright-capsolver.git
cd playwright-capsolver
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
playwright install chromiumExport .env.example values and run python examples/quickstart.py.
By default the demo only detects. Set CAPSOLVER_RUN_SOLVE=true only when TARGET_URL is a lawful, authorized test page and you intend to make a paid solving request.
from capsolver_agent import create_executor
executor = create_executor()
detection = await executor.execute("detect_captchas", {"page_url": target_url})
result = await executor.execute("solve_on_page", {
"page_url": target_url,
"autofill": True,
})See examples/quickstart.py for the guarded flow.
examples/quickstart.py Browser schema, detection, and opt-in solving demo
requirements.txt CapSolver browser extras plus Playwright
tests/test_demo.py Offline validation
.github/workflows/ci.yml Demo checks
Use browser solving only for lawful, user-authorized workflows that respect target-site terms. Never commit secrets or private target data.
See CONTRIBUTING.md, SUPPORT.md, and SECURITY.md. Licensed under the ISC License.
Playwright is a third-party project. This repository is maintained by CapSolver and is not affiliated with or endorsed by Microsoft.