From 323766180e90490697a03d35c703923bdeb42be7 Mon Sep 17 00:00:00 2001 From: STJ Date: Mon, 16 Mar 2026 13:03:40 -0700 Subject: [PATCH] add run test --- tests/integration/test_browser_actions.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/integration/test_browser_actions.py b/tests/integration/test_browser_actions.py index 2e51d319..0aa27dd7 100644 --- a/tests/integration/test_browser_actions.py +++ b/tests/integration/test_browser_actions.py @@ -118,6 +118,19 @@ def test_send_keys(browser): ui.log(f"send_keys → {result_keys}") +def test_run(browser): + ui.status("test_run → asking agent to read example.com title") + browser.navigate(url="https://example.com") + + result = browser.run(task="What is the title of this page? Return only the title text.") + ui.log(f"run → {str(result.get('result', ''))[:120]}") + + if "example" not in str(result.get("result", "")).lower(): + Fail(result).expected("result containing 'example'").got( + str(result.get("result", ""))[:200] + ) + + def _tab_id(tab_info): return getattr(tab_info, "target_id", "")[-4:]