Skip to content

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

Update service.py

Matic Zavadlald0142da53392
diff --git a/browser_use/dom/service.py b/browser_use/dom/service.py
index dd8a716f7..e7e230e05 100644
--- a/browser_use/dom/service.py
+++ b/browser_use/dom/service.py
@@ -1,6 +1,5 @@
import gc
import logging
-import time
from importlib import resources
from typing import Optional
@@ -34,14 +33,9 @@ class DomService:
focus_element: int = -1,
viewport_expansion: int = 0,
) -> DOMState:
- start = time.time()
element_tree, selector_map = await self._build_dom_tree(highlight_elements, focus_element, viewport_expansion)
dom_state = DOMState(element_tree=element_tree, selector_map=selector_map)
- end = time.time()
-
- print(f'[clickable] Time taken: {end - start} seconds')
-
return dom_state
# @profile