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
Increase interaction timeouts to reduce failures on slow pages
Magnus Müller12caa635b923
diff --git a/browser_use/browser/watchdogs/default_action_watchdog.py b/browser_use/browser/watchdogs/default_action_watchdog.pyindex c62120ac9..5c5597f12 100644--- a/browser_use/browser/watchdogs/default_action_watchdog.py+++ b/browser_use/browser/watchdogs/default_action_watchdog.py@@ -123,7 +123,7 @@ class DefaultActionWatchdog(BaseWatchdog):# Element not found or error - fall back to typing to the pageself.logger.warning(f'Failed to type to element {index_for_logging}: {e}. Falling back to page typing.')try:- await asyncio.wait_for(self._click_element_node_impl(element_node), timeout=3.0)+ await asyncio.wait_for(self._click_element_node_impl(element_node), timeout=10.0)except Exception as e:passawait self._type_to_page(event.text)@@ -493,7 +493,7 @@ class DefaultActionWatchdog(BaseWatchdog):},session_id=session_id,),- timeout=1.0, # 1 second timeout for mousePressed+ timeout=3.0, # 3 second timeout for mousePressed)await asyncio.sleep(0.08)except TimeoutError:@@ -513,7 +513,7 @@ class DefaultActionWatchdog(BaseWatchdog):},session_id=session_id,),- timeout=3.0, # 1 second timeout for mouseReleased+ timeout=5.0, # 5 second timeout for mouseReleased)except TimeoutError:self.logger.debug('⏱️ Mouse up timed out (possibly due to lag or dialog popup), continuing...')