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
more clear_existing fixes for input_text
Nick Sweeting524017c8b95f
diff --git a/browser_use/controller/service.py b/browser_use/controller/service.pyindex 2cb29507a..d6c839ca8 100644--- a/browser_use/controller/service.py+++ b/browser_use/controller/service.py@@ -274,7 +274,7 @@ class Controller(Generic[Context]):# Dispatch type text event with nodetry:- event = browser_session.event_bus.dispatch(TypeTextEvent(node=node, text=params.text))+ event = browser_session.event_bus.dispatch(TypeTextEvent(node=node, text=params.text, clear_existing=params.clear_existing))await eventawait event.event_result(raise_if_any=True, raise_if_none=False)msg = f"Input '{params.text}' into element {params.index}."diff --git a/browser_use/controller/views.py b/browser_use/controller/views.pyindex 5d7be1671..c87c4eecb 100644--- a/browser_use/controller/views.py+++ b/browser_use/controller/views.py@@ -23,6 +23,7 @@ class ClickElementAction(BaseModel):class InputTextAction(BaseModel):index: inttext: str+ clear_existing: bool = Field(default=True, description='set True to clear existing text, False to append to existing text')class DoneAction(BaseModel):