Skip to content

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

fix cookies relative path test

Nick Sweetingc5cc142a4c80
diff --git a/tests/ci/test_browser_session_cookies.py b/tests/ci/test_browser_session_cookies.py
index 91410e1bc..d3da458e9 100644
--- a/tests/ci/test_browser_session_cookies.py
+++ b/tests/ci/test_browser_session_cookies.py
@@ -194,12 +194,12 @@ class TestBrowserSessionCookies:
profile = BrowserProfile(
headless=True,
user_data_dir=None,
- cookies_file='test_cookies.json', # Relative path
+ cookies_file='./test_cookies.json', # Relative path
downloads_path=browser_profile_with_cookies.downloads_path,
)
# Copy test cookies to expected location
- expected_path = Path(profile.downloads_path) / 'test_cookies.json'
+ expected_path = Path('.').resolve() / 'test_cookies.json'
expected_path.parent.mkdir(parents=True, exist_ok=True)
expected_path.write_text(
json.dumps([{'name': 'relative_cookie', 'value': 'relative_value', 'domain': 'localhost', 'path': '/'}])