Skip to content

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

Merge branch 'main' into main

Magnus Müllerda8b36220640
diff --cc browser_use/browser/browser.py
index 6505bd39c,85422bc74..18937d8e7
--- a/browser_use/browser/browser.py
+++ b/browser_use/browser/browser.py
@@@ -156,13 -145,16 +156,16 @@@ class Browser
except requests.ConnectionError:
logger.debug('No existing Chrome instance found, starting a new one')
-- # Start a new Chrome instance
- subprocess.Popen(
- [
++ # Start a new Chrome instance
+ args = [
- self.config.chrome_instance_path,
+ self.config.browser_instance_path,
'--remote-debugging-port=9222',
]
- + self.config.extra_browser_args,
+ if self.config.headless:
+ args.append('--headless')
+ subprocess.Popen(
+ args
- + self.config.extra_chromium_args,
++ + self.config.extra_browser_args,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)