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
Check if text node is visable
Magnus Müller52d82008e485
diff --git a/browser_use/dom/buildDomTree.js b/browser_use/dom/buildDomTree.jsindex bf4133a9d..8ed92e6b0 100644--- a/browser_use/dom/buildDomTree.js+++ b/browser_use/dom/buildDomTree.js@@ -626,14 +626,13 @@// Special case for text nodesif (node.nodeType === Node.TEXT_NODE) {const textContent = node.textContent.trim();- if (textContent) { // && isTextNodeVisible(node)+ if (textContent ) { //const id = `${ID.current++}`;DOM_HASH_MAP[id] = {type: "TEXT_NODE",text: textContent,- isVisible: true,-+ isVisible: isTextNodeVisible(node),};return id;