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
Rename 'debug_highlight_elements' to 'dom_highlight_elements' in BrowserProfile for clarity
kalil03213aa5cfde4179
diff --git a/browser_use/browser/profile.py b/browser_use/browser/profile.pyindex 63a9ea7cd..89855314c 100644--- a/browser_use/browser/profile.py+++ b/browser_use/browser/profile.py@@ -620,9 +620,8 @@ class BrowserProfile(BrowserConnectArgs, BrowserLaunchPersistentContextArgs, Browait_between_actions: float = Field(default=0.5, description='Time to wait between actions.')# --- UI/viewport/DOM ----highlight_elements: bool = Field(default=True, description='Highlight interactive elements on the page.')- debug_highlight_elements: bool = Field(default=False, description='Debug highlight elements on the page (only for debugging).')+ dom_highlight_elements: bool = Field(default=False, description='Highlight interactive elements in the DOM (only for debugging purposes).')filter_highlight_ids: bool = Field(default=True, description='Only show element IDs in highlights if llm_representation is less than 10 characters.')diff --git a/browser_use/browser/watchdogs/dom_watchdog.py b/browser_use/browser/watchdogs/dom_watchdog.pyindex f02c7a45a..4c6bbca1c 100644--- a/browser_use/browser/watchdogs/dom_watchdog.py+++ b/browser_use/browser/watchdogs/dom_watchdog.py@@ -248,7 +248,7 @@ class DOMWatchdog(BaseWatchdog):self.logger.warning(f'🔍 DOMWatchdog.on_BrowserStateRequestEvent: Python highlighting failed: {e}')# Add browser-side highlights for user visibility- if content and content.selector_map and self.browser_session.browser_profile.debug_highlight_elements:+ if content and content.selector_map and self.browser_session.browser_profile.dom_highlight_elements:try:self.logger.debug('🔍 DOMWatchdog.on_BrowserStateRequestEvent: 🎨 Adding browser-side highlights...')await self.browser_session.add_highlights(content.selector_map)