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
Run pre-commit hooks
Chris Schnabl84b7eb07eee5
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex fe00573bb..51fd5de1f 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -1884,9 +1884,7 @@ class Agent(Generic[Context, AgentStructuredOutput]):async def _execute_history_step(self, history_item: AgentHistory, delay: float) -> list[ActionResult]:"""Execute a single step from history with element validation"""assert self.browser_session is not None, 'BrowserSession is not set up'- state = await self.browser_session.get_browser_state_summary(- include_screenshot=False- )+ state = await self.browser_session.get_browser_state_summary(include_screenshot=False)if not state or not history_item.model_output:raise ValueError('Invalid state or model output')updated_actions = []diff --git a/tests/scripts/debug_iframe_scrolling.py b/tests/scripts/debug_iframe_scrolling.pyindex 0debb6164..7b02fba66 100644--- a/tests/scripts/debug_iframe_scrolling.py+++ b/tests/scripts/debug_iframe_scrolling.py@@ -131,9 +131,7 @@ async def debug_iframe_scrolling():"""Capture DOM state and return analysis"""print(f'\n📸 Capturing DOM state: {label}')state_event = browser_session.event_bus.dispatch(- BrowserStateRequestEvent(- include_dom=True, include_screenshot=False, include_recent_events=False- )+ BrowserStateRequestEvent(include_dom=True, include_screenshot=False, include_recent_events=False))browser_state = await state_event.event_result()