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
Remove waiting from go_to_url since we wait later when we get the new state
Magnus Müller0dc84c489781
diff --git a/browser_use/browser/session.py b/browser_use/browser/session.pyindex 100755b09..a43055062 100644--- a/browser_use/browser/session.py+++ b/browser_use/browser/session.py@@ -2490,14 +2490,18 @@ class BrowserSession(BaseModel):page = await self.get_current_page()try:- await asyncio.wait_for(page.evaluate('1'), timeout=1.0)+ await asyncio.wait_for(page.evaluate('1'), timeout=1)except Exception as e:# new tab to recoverself.logger.warning(f'🚨 Page {_log_pretty_url(normalized_url)} is unresponsive, creating new tab...')page = await self.create_new_tab(normalized_url)return- await page.goto(normalized_url)+ try:+ await asyncio.wait_for(page.goto(normalized_url), timeout=0.1)+ except Exception as e:+ # NOTE we dont have to wait since we will wait later when we get the new page state+ pass@observe()async def refresh_page(self):