Skip to content

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

fix: highlight elements arg in build-dom-tree script

Pratik74af98344078
diff --git a/browser_use/dom/service.py b/browser_use/dom/service.py
index ae8f21498..2baed4d20 100644
--- a/browser_use/dom/service.py
+++ b/browser_use/dom/service.py
@@ -31,7 +31,7 @@ class DomService:
js_code = resources.read_text('browser_use.dom', 'buildDomTree.js')
eval_page = await self.page.evaluate(
- js_code, [highlight_elements]
+ js_code, (highlight_elements)
) # This is quite big, so be careful
html_to_dict = self._parse_node(eval_page)