Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Enhance dropdown

மனோஜ்குமார் பழனிச்சாமி10b3d8f28d21
diff --git a/browser_use/dom/buildDomTree.js b/browser_use/dom/buildDomTree.js
index 539c76225..8ec13c466 100644
--- a/browser_use/dom/buildDomTree.js
+++ b/browser_use/dom/buildDomTree.js
@@ -513,7 +513,9 @@
// Added enhancement to capture dropdown interactive elements
if (element.classList && (
+ element.classList.contains("button") ||
element.classList.contains('dropdown-toggle') ||
+ element.getAttribute('data-index') ||
element.getAttribute('data-toggle') === 'dropdown' ||
element.getAttribute('aria-haspopup') === 'true'
)) {