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
properly clear input elements before typing in text
Nick Sweetingb1142a59571e
diff --git a/browser_use/browser/context.py b/browser_use/browser/context.pyindex 13a2e70ce..28dde79e1 100644--- a/browser_use/browser/context.py+++ b/browser_use/browser/context.py@@ -1235,7 +1235,7 @@ class BrowserContext:disabled = await disabled_handle.json_value() if disabled_handle else Falseif (await is_contenteditable.json_value() or tag_name == 'input') and not (readonly or disabled):- await element_handle.evaluate('el => el.textContent = ""')+ await element_handle.evaluate('el => {el.textContent = ""; el.value = "";}')await element_handle.type(text, delay=5)else:await element_handle.fill(text)