Skip to content

Repository files navigation

Playwright + CapSolver Agent examples

Demo repository CI License: ISC

Runnable examples for CapSolver Agent's Playwright-backed detect_captchas and solve_on_page tools.

Examples only: this repository does not publish playwright-capsolver or duplicate the browser engine.

Repository scope

The shared capsolver-agent tool executor delegates browser work to capsolver-core. This repository demonstrates those public tools and keeps solving opt-in.

Quick start

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 chromium

Export .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.

Key integration code

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.

Project layout

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

Documentation

Responsible use

Use browser solving only for lawful, user-authorized workflows that respect target-site terms. Never commit secrets or private target data.

Contributing, support, and license

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.

About

Runnable Playwright browser-tool examples using the CapSolver Agent library.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages