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
For input also make sure its the top element
Magnus Müller726301f3fcfa
diff --git a/browser_use/browser/watchdogs/default_action_watchdog.py b/browser_use/browser/watchdogs/default_action_watchdog.pyindex cefc85e46..24365d517 100644--- a/browser_use/browser/watchdogs/default_action_watchdog.py+++ b/browser_use/browser/watchdogs/default_action_watchdog.py@@ -1122,11 +1122,20 @@ class DefaultActionWatchdog(BaseWatchdog):if coords:center_x = coords.x + coords.width / 2center_y = coords.y + coords.height / 2- input_coordinates = {'input_x': center_x, 'input_y': center_y}- self.logger.debug(f'Using unified coordinates: x={center_x:.1f}, y={center_y:.1f}')++ # Check for occlusion before using coordinates for focus+ is_occluded = await self._check_element_occlusion(backend_node_id, center_x, center_y, cdp_session)++ if is_occluded:+ self.logger.debug('🚫 Input element is occluded, skipping coordinate-based focus')+ input_coordinates = None # Force fallback to CDP-only focus+ else:+ input_coordinates = {'input_x': center_x, 'input_y': center_y}+ self.logger.debug(f'Using unified coordinates: x={center_x:.1f}, y={center_y:.1f}')else:input_coordinates = Noneself.logger.debug('No coordinates found for element')+# Ensure we have a valid object_id before proceedingif not object_id:raise ValueError('Could not get object_id for element')