Skip to content

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

Update browser_use/dom/serializer/serializer.py

Magnus Müller306c9711e6cb
diff --git a/browser_use/dom/serializer/serializer.py b/browser_use/dom/serializer/serializer.py
index ea6e76d9b..824ed7064 100644
--- a/browser_use/dom/serializer/serializer.py
+++ b/browser_use/dom/serializer/serializer.py
@@ -454,7 +454,7 @@ class DOMTreeSerializer:
if has_validation_attrs:
is_visible = True # Force visibility for validation elements
- # Include if visible, interactive, scrollable, has children, or is shadow host
+ # Include if visible, scrollable, has children, or is shadow host
if is_visible or is_scrollable or has_shadow_content or is_shadow_host:
simplified = SimplifiedNode(original_node=node, children=[], is_shadow_host=is_shadow_host)