From 2859da7b7c3eed8ebb74b8757d14e7241053a9e8 Mon Sep 17 00:00:00 2001 From: leeguooooo Date: Fri, 12 Jun 2026 17:33:24 +0900 Subject: [PATCH] docs: document `chrome-use test` in README + point core skill at it --- README.md | 41 ++++++++++++++++++++++++++++++++++++++++ skill-data/core/SKILL.md | 2 ++ 2 files changed, 43 insertions(+) diff --git a/README.md b/README.md index 67d11b2..abb14d2 100644 --- a/README.md +++ b/README.md @@ -205,6 +205,47 @@ chrome-use --launch --profile auto open https://x.com/home In CI environments, standalone mode is used automatically. +## Automated testing (`chrome-use test`) + +Turn the repetitive "open it, click around, check it's right" work into a +**re-runnable suite** — unit tests for the frontend. Write cases in YAML; steps +reuse chrome-use's own commands and assertions compile to a single check: + +```yaml +# smoke.yaml +suite: chatgpt smoke +setup: + - account: chatgpt/huayue # inject a cookie-use login (optional) +cases: + - name: home loads logged in + steps: + - open: https://chatgpt.com/ + - wait: { load: networkidle } + assert: + - url: { contains: chatgpt.com } + - visible: "#prompt-textarea" +``` + +```bash +chrome-use test smoke.yaml # launches an isolated browser, runs cases +chrome-use test smoke.yaml --session default # …or against your connected Chrome +``` + +``` +suite: chatgpt smoke (session cu-test) + ✓ home loads logged in 1.2s + ✗ composer takes text 0.8s + assert text "#prompt-textarea" contains "hi" → got "" + ↳ cu-test-artifacts/composer-takes-text.png +2 cases · 1 passed · 1 failed +``` + +Exit code is non-zero if any case fails (drop it into CI), and failed cases save +a screenshot. Assertions: `url` · `visible` · `hidden` · `text` · `count` · +`eval`. Steps: `open` · `click` · `fill` · `type` · `press` · `wait` · `scroll` +· `eval`. Full guide: `chrome-use skills get test`. Found a regression? Add a +case — the suite gets more valuable the more you use it. + ## Anti-detection stealth shield diff --git a/skill-data/core/SKILL.md b/skill-data/core/SKILL.md index 69a4444..60290b2 100644 --- a/skill-data/core/SKILL.md +++ b/skill-data/core/SKILL.md @@ -672,6 +672,8 @@ and [references/authentication.md](references/authentication.md). `chrome-use skills get electron` - **Slack workspace automation**: `chrome-use skills get slack` - **Exploratory testing / QA / bug hunts**: `chrome-use skills get dogfood` +- **Re-runnable test suites (frontend "unit tests")**: `chrome-use skills get test` + — turn repeated checks into a `chrome-use test ` regression suite - **Vercel Sandbox microVMs**: `chrome-use skills get vercel-sandbox` - **AWS Bedrock AgentCore cloud browser**: `chrome-use skills get agentcore`