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
wip
Gregor Žuničba73c748e470
diff --git a/browser_use/dom/buildDomTree.js b/browser_use/dom/buildDomTree.jsindex b808e6dab..74900c998 100644--- a/browser_use/dom/buildDomTree.js+++ b/browser_use/dom/buildDomTree.js@@ -592,7 +592,7 @@return false- const interactiveRoles = new Set(['button-icon', 'dialog', 'button-text-icon-only', 'treeitem', 'alert', 'grid', 'progressbar', 'radio', 'checkbox', 'menuitem', 'option', 'switch', 'dropdown', 'scrollbar', 'combobox', 'a-button-text', 'button', 'region', 'textbox', 'tabpanel', 'tab', 'click', 'button-text', 'spinbutton', 'a-button-inner', 'link', 'menu', 'slider', 'listbox', 'a-dropdown-button', 'button-icon-only', 'searchbox', 'menuitemradio', 'tooltip', 'tree', 'menuitemcheckbox']);+const tagName = element.tagName.toLowerCase();const role = element.getAttribute("role");@@ -617,6 +617,10 @@return true;}+ // return false++ const interactiveRoles = new Set(['button-icon', 'dialog', 'button-text-icon-only', 'treeitem', 'alert', 'grid', 'progressbar', 'radio', 'checkbox', 'menuitem', 'option', 'switch', 'dropdown', 'scrollbar', 'combobox', 'a-button-text', 'button', 'region', 'textbox', 'tabpanel', 'tab', 'click', 'button-text', 'spinbutton', 'a-button-inner', 'link', 'menu', 'slider', 'listbox', 'list', 'listitem', 'a-dropdown-button', 'button-icon-only', 'searchbox', 'menuitemradio', 'tooltip', 'tree', 'menuitemcheckbox']);+// Basic role/attribute checksconst hasInteractiveRole =hasAddressInputClass ||@@ -685,14 +689,6 @@const listeners = {};const eventTypes = ["click",- "mousedown",- "mouseup",- "touchstart",- "touchend",- "keydown",- "keyup",- "focus",- "blur",];for (const type of eventTypes) {@@ -733,11 +729,11 @@element.draggable || element.getAttribute("draggable") === "true";return (- hasAriaProps ||- hasClickHandler ||- hasClickListeners ||- isDraggable ||- isContentEditable ||+ // hasAriaProps ||+ // hasClickHandler ||+ // hasClickListeners ||+ // isDraggable ||+ // isContentEditable ||false);}diff --git a/browser_use/dom/tests/extraction_test.py b/browser_use/dom/tests/extraction_test.pyindex 01aa68c51..8a7c0070b 100644--- a/browser_use/dom/tests/extraction_test.py+++ b/browser_use/dom/tests/extraction_test.py@@ -89,7 +89,7 @@ async def test_process_html_file():async def test_focus_vs_all_elements():config = BrowserContextConfig(- cookies_file='cookies3.json',+ # cookies_file='cookies3.json',disable_security=True,wait_for_network_idle_page_load_time=2,)