Skip to content

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

fix annoying deprecation warnings

Nick Sweeting04999c91f751
diff --git a/browser_use/browser/profile.py b/browser_use/browser/profile.py
index ad64f44bd..315eaff94 100644
--- a/browser_use/browser/profile.py
+++ b/browser_use/browser/profile.py
@@ -562,12 +562,8 @@ class BrowserProfile(BrowserConnectArgs, BrowserLaunchPersistentContextArgs, Bro
default=None,
description='Window size to use for the browser when headless=False.',
)
- window_height: int | None = Field(
- default=None, description='DEPRECATED, use window_size["height"] instead', deprecated=True, exclude=True
- )
- window_width: int | None = Field(
- default=None, description='DEPRECATED, use window_size["width"] instead', deprecated=True, exclude=True
- )
+ window_height: int | None = Field(default=None, description='DEPRECATED, use window_size["height"] instead', exclude=True)
+ window_width: int | None = Field(default=None, description='DEPRECATED, use window_size["width"] instead', exclude=True)
window_position: ViewportSize | None = Field(
default_factory=lambda: {'width': 0, 'height': 0},
description='Window position to use for the browser x,y from the top left when headless=False.',