Skip to content

Commit 300d2a3

Browse files
committed
Document Browser Use callback demo output
Closes #364.
1 parent 431420e commit 300d2a3

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

examples/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,19 @@ Expect `browsertrace list --limit 5` to show a recent
151151
two successful steps: `act: click the checkout button` and
152152
`extract: extract the order total`.
153153

154+
For a no-service Browser Use-shaped callback demo, run:
155+
156+
```bash
157+
BROWSERTRACE_HOME=/tmp/browsertrace-demo python examples/browser_use_callback_demo.py
158+
BROWSERTRACE_HOME=/tmp/browsertrace-demo browsertrace list --limit 5
159+
BROWSERTRACE_HOME=/tmp/browsertrace-demo browsertrace show <run_id>
160+
```
161+
162+
Expect `browsertrace list --limit 5` to show a recent
163+
`demo: browser-use callback flow` run, and
164+
`browsertrace show <run_id>` to list two successful steps:
165+
`search_google(query=BrowserTrace)` and `click(selector=#result-1)`.
166+
154167
For a no-service Browser Use-shaped run-hook demo, run:
155168

156169
```bash

tests/test_metadata.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3087,6 +3087,22 @@ def test_examples_readme_documents_browser_use_run_hooks_expected_output():
30873087
assert "browsertrace show <run_id>" in verification_section
30883088

30893089

3090+
def test_examples_readme_documents_browser_use_callback_expected_output():
3091+
project_root = Path(__file__).resolve().parents[1]
3092+
examples_readme = (project_root / "examples" / "README.md").read_text()
3093+
verification_section = examples_readme.split(
3094+
"### Quick local verification for a no-service wrapper example", 1
3095+
)[1].split("For Playwright examples", 1)[0]
3096+
3097+
assert "python examples/browser_use_callback_demo.py" in verification_section
3098+
assert "no-service Browser Use-shaped callback demo" in verification_section
3099+
assert "demo: browser-use callback flow" in verification_section
3100+
assert "search_google(query=BrowserTrace)" in verification_section
3101+
assert "click(selector=#result-1)" in verification_section
3102+
assert "browsertrace list --limit 5" in verification_section
3103+
assert "browsertrace show <run_id>" in verification_section
3104+
3105+
30903106
def test_examples_readme_links_stagehand_and_skyvern_guides_near_matrix():
30913107
project_root = Path(__file__).resolve().parents[1]
30923108
examples_readme = (project_root / "examples" / "README.md").read_text()

0 commit comments

Comments
 (0)