File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -151,6 +151,19 @@ Expect `browsertrace list --limit 5` to show a recent
151151two successful steps: ` act: click the checkout button ` and
152152` extract: extract the order total ` .
153153
154+ For a no-service Browser Use-shaped run-hook demo, run:
155+
156+ ``` bash
157+ BROWSERTRACE_HOME=/tmp/browsertrace-demo python examples/browser_use_run_hooks_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 run hooks flow ` run, and
164+ ` browsertrace show <run_id> ` to list two successful steps:
165+ ` search_google(query=BrowserTrace) ` and ` click(selector=#result-1) ` .
166+
154167For Playwright examples, install the browser runtime first:
155168
156169``` bash
Original file line number Diff line number Diff line change @@ -3071,6 +3071,22 @@ def test_examples_readme_links_browser_use_run_hooks_guide():
30713071 assert "Browser Use + LLM" in example_matrix
30723072
30733073
3074+ def test_examples_readme_documents_browser_use_run_hooks_expected_output ():
3075+ project_root = Path (__file__ ).resolve ().parents [1 ]
3076+ examples_readme = (project_root / "examples" / "README.md" ).read_text ()
3077+ verification_section = examples_readme .split (
3078+ "### Quick local verification for a no-service wrapper example" , 1
3079+ )[1 ].split ("For Playwright examples" , 1 )[0 ]
3080+
3081+ assert "python examples/browser_use_run_hooks_demo.py" in verification_section
3082+ assert "no-service Browser Use-shaped run-hook demo" in verification_section
3083+ assert "demo: browser-use run hooks flow" in verification_section
3084+ assert "search_google(query=BrowserTrace)" in verification_section
3085+ assert "click(selector=#result-1)" in verification_section
3086+ assert "browsertrace list --limit 5" in verification_section
3087+ assert "browsertrace show <run_id>" in verification_section
3088+
3089+
30743090def test_examples_readme_links_stagehand_and_skyvern_guides_near_matrix ():
30753091 project_root = Path (__file__ ).resolve ().parents [1 ]
30763092 examples_readme = (project_root / "examples" / "README.md" ).read_text ()
You can’t perform that action at this time.
0 commit comments