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
Logging
Magnus Müller1bbae1c4de13
diff --git a/browser_use/dom/service.py b/browser_use/dom/service.pyindex 5b66746ee..92dde5228 100644--- a/browser_use/dom/service.py+++ b/browser_use/dom/service.py@@ -98,7 +98,9 @@ class DomService:}try:+ self.logger.debug(f'🔧 Starting JavaScript DOM analysis for {self.page.url[:50]}...')eval_page: dict = await self.page.evaluate(self.js_code, args)+ self.logger.debug('✅ JavaScript DOM analysis completed')except Exception as e:self.logger.error('Error evaluating JavaScript: %s', e)raise@@ -128,7 +130,10 @@ class DomService:# processed_nodes,)- return await self._construct_dom_tree(eval_page)+ self.logger.debug('🔄 Starting Python DOM tree construction...')+ result = await self._construct_dom_tree(eval_page)+ self.logger.debug('✅ Python DOM tree construction completed')+ return result@time_execution_async('--construct_dom_tree')async def _construct_dom_tree(