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
Should be visable
Magnus Müllerbdb6dcb5956f
diff --git a/browser_use/dom/serializer/serializer.py b/browser_use/dom/serializer/serializer.pyindex 8f53838fc..e13e982a1 100644--- a/browser_use/dom/serializer/serializer.py+++ b/browser_use/dom/serializer/serializer.py@@ -105,7 +105,7 @@ class DOMTreeSerializer:is_scrollable = node.is_scrollable# Include if interactive (regardless of visibility), or scrollable, or has children to process- should_include = is_interactive or is_scrollable or node.children_nodes+ should_include = (is_interactive and is_visible) or is_scrollable or node.children_nodesif should_include:simplified = SimplifiedNode(original_node=node)@@ -119,7 +119,7 @@ class DOMTreeSerializer:simplified.children.append(simplified_child)# Return if meaningful or has meaningful children- if is_interactive or is_scrollable or simplified.children:+ if (is_interactive and is_visible) or is_scrollable or simplified.children:return simplifiedelif node.node_type == NodeType.TEXT_NODE: