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
fix: fixing detection of interactive elements in shadow DOM; The getBoundingClientRect() of the Shadow DOM host element may return width/height = 0
mingzhong.liab83e505b5c7
diff --git a/browser_use/dom/dom_tree/index.js b/browser_use/dom/dom_tree/index.jsindex a605a784c..f1b161e5f 100644--- a/browser_use/dom/dom_tree/index.js+++ b/browser_use/dom/dom_tree/index.js@@ -1235,7 +1235,8 @@}// Early viewport check - only filter out elements clearly outside viewport- if (viewportExpansion !== -1) {+ // The getBoundingClientRect() of the Shadow DOM host element may return width/height = 0+ if (viewportExpansion !== -1 && !node.shadowRoot) {const rect = getCachedBoundingRect(node); // Keep for initial quick checkconst style = getCachedComputedStyle(node);