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
removed unnecesary ]* after new element
Gregor Žunič33fc9c5aeb2e
diff --git a/browser_use/agent/system_prompt.md b/browser_use/agent/system_prompt.mdindex 37461b79c..c63dfd44a 100644--- a/browser_use/agent/system_prompt.md+++ b/browser_use/agent/system_prompt.md@@ -56,7 +56,7 @@ Interactive Elements: All interactive elements will be provided in format as [inExamples:[33]<div>User form</div>-\t*[35]*<button aria-label='Submit form'>Submit</button>+\t*[35]<button aria-label='Submit form'>Submit</button>Note that:- Only elements with numeric indexes in [] are interactivediff --git a/browser_use/dom/views.py b/browser_use/dom/views.pyindex 5d4acabba..8fbd8e35a 100644--- a/browser_use/dom/views.py+++ b/browser_use/dom/views.py@@ -244,7 +244,7 @@ class DOMElementNode(DOMBaseNode):# Build the lineif node.is_new:- highlight_indicator = f'*[{node.highlight_index}]*'+ highlight_indicator = f'*[{node.highlight_index}]'else:highlight_indicator = f'[{node.highlight_index}]'@@ -264,7 +264,7 @@ class DOMElementNode(DOMBaseNode):elif not attributes_html_str:line += ' '- line += ' />' # 1 token+ # line += ' />' # 1 tokenformatted_text.append(line)# Process children regardless