Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
test: narrow restored file type for pyright (Base64BinaryFile); ruff format
MagMuelleraaeded1c0a5e
diff --git a/tests/ci/test_file_system_images.py b/tests/ci/test_file_system_images.pyindex 4d3696afb..dfe9b63cb 100644--- a/tests/ci/test_file_system_images.py+++ b/tests/ci/test_file_system_images.py@@ -7,7 +7,7 @@ from pathlib import Pathimport pytestfrom PIL import Image-from browser_use.filesystem.file_system import FileSystem+from browser_use.filesystem.file_system import Base64BinaryFile, FileSystemclass TestImageFiles:@@ -307,7 +307,7 @@ class TestBinaryFileCreation:original_bytes = (fs.get_dir() / 'logo.png').read_bytes()fs2 = FileSystem.from_state(fs.get_state())restored = fs2.get_file('logo.png')- assert restored is not None+ assert isinstance(restored, Base64BinaryFile)# Content integrity, not just existence: decoded bytes must round-trip and be a real PNGassert restored._decoded() == original_bytesassert restored._decoded()[:8] == b'\x89PNG\r\n\x1a\n'