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 hardcoded max iframe recursion limit
Gregor Žunič893d1ad2b941
diff --git a/browser_use/dom/serializer/serializer.py b/browser_use/dom/serializer/serializer.pyindex 0cdaa5398..436faf20e 100644--- a/browser_use/dom/serializer/serializer.py+++ b/browser_use/dom/serializer/serializer.py@@ -127,10 +127,6 @@ class DOMTreeSerializer:def _create_simplified_tree(self, node: EnhancedDOMTreeNode, depth: int = 0) -> SimplifiedNode | None:"""Step 1: Create a simplified tree with enhanced element detection."""- # Prevent infinite recursion by limiting depth to 30 levels- if depth > 30:- return None-if node.node_type == NodeType.DOCUMENT_NODE:# for all cldren including shadow rootsfor child in node.children_and_shadow_roots: