Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Len to show highlight index set less than 3

Magnus Müller929489352ee1
diff --git a/browser_use/browser/python_highlights.py b/browser_use/browser/python_highlights.py
index dfd23976a..46362099f 100644
--- a/browser_use/browser/python_highlights.py
+++ b/browser_use/browser/python_highlights.py
@@ -342,7 +342,7 @@ def process_element_highlight(
# Use the meaningful text that matches what the LLM sees
meaningful_text = element.get_meaningful_text_for_llm()
# Show ID only if meaningful text is less than 5 characters
- if len(meaningful_text) < 5:
+ if len(meaningful_text) < 3:
index_text = str(element_index)
else:
# Always show ID when filter is disabled