diff --git a/browser_use/dom/serializer/html_serializer.py b/browser_use/dom/serializer/html_serializer.py index 5050cfa17..8aaf31df7 100644 --- a/browser_use/dom/serializer/html_serializer.py +++ b/browser_use/dom/serializer/html_serializer.py @@ -45,12 +45,11 @@ class HTMLSerializer: elif node.node_type == NodeType.DOCUMENT_FRAGMENT_NODE: # Shadow DOM root - wrap in template with shadowrootmode attribute - # This is the declarative shadow DOM syntax that html2text can process parts = [] # Add shadow root opening shadow_type = node.shadow_root_type or 'open' - parts.append(f'