Skip to content

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

fix: linter

satya-nutella34ff079c908c
diff --git a/.gitignore b/.gitignore
index d25cdc937..c510322b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,4 +37,4 @@ private_example
uv.lock
-.idea
\ No newline at end of file
+.idea
diff --git a/browser_use/browser/context.py b/browser_use/browser/context.py
index cc4cd9391..30e2f4b52 100644
--- a/browser_use/browser/context.py
+++ b/browser_use/browser/context.py
@@ -1511,7 +1511,7 @@ class BrowserContext:
element_handle = await current_frame.query_selector(css_selector)
if element_handle:
is_visible = await self._is_visible(element_handle)
- if not is_visible:
+ if is_visible:
await element_handle.scroll_into_view_if_needed()
return element_handle
return None