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
Update buildDomTree.js
Matic Zavadlal81056a2f3765
diff --git a/browser_use/dom/buildDomTree.js b/browser_use/dom/buildDomTree.jsindex bcfcfe7ec..313a10a9e 100644--- a/browser_use/dom/buildDomTree.js+++ b/browser_use/dom/buildDomTree.js@@ -658,10 +658,12 @@// Handle shadow DOMif (node.shadowRoot) {- const shadowChildren = Array.from(node.shadowRoot.childNodes).map(- (child) => buildDomTree(child, parentIframe)- );- nodeData.children.push(...shadowChildren);+ for (const child of node.shadowRoot.childNodes) {+ const domElement = buildDomTree(child, parentIframe);+ if (domElement) {+ nodeData.children.push(domElement);+ }+ }}// Handle iframes