Skip to content

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

fix: use tempfile.gettempdir() instead of hardcoded /tmp for cross-platform compat

g97iulio16099939aa8f1126
diff --git a/browser_use/browser/profile.py b/browser_use/browser/profile.py
index 4d8858a2d..e6794618c 100644
--- a/browser_use/browser/profile.py
+++ b/browser_use/browser/profile.py
@@ -428,6 +428,7 @@ class BrowserLaunchArgs(BaseModel):
def set_default_downloads_path(self) -> Self:
"""Set a unique default downloads path if none is provided."""
if self.downloads_path is None:
+ import tempfile
import uuid
# Create unique directory in system temp folder for downloads