Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Update test_agent_real_tasks to enable headless mode for BrowserProfile, enhancing browser session management

Magnus Müller9ef3d6198a19
diff --git a/tests/ci/test_agent_real_tasks.py b/tests/ci/test_agent_real_tasks.py
index 6b5130fde..14af0465d 100644
--- a/tests/ci/test_agent_real_tasks.py
+++ b/tests/ci/test_agent_real_tasks.py
@@ -35,7 +35,7 @@ async def test_agent_real_task(task_file):
judge_llm = ChatOpenAI(model='gpt-4o-mini')
shared_profile = BrowserProfile(
- headless=False,
+ headless=True,
user_data_dir=None, # use dedicated tmp user_data_dir per session
keep_alive=True, # don't close the browser after the agent finishes (only needed to save the session's updated cookies to disk after the run, see below)
)