Skip to content

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

Linter new line

Magnus Müller82b241ddbb9a
diff --git a/.github/ISSUE_TEMPLATE/1_element_detection_bug.yml b/.github/ISSUE_TEMPLATE/1_element_detection_bug.yml
index 126a127e3..3767eb7a9 100644
--- a/.github/ISSUE_TEMPLATE/1_element_detection_bug.yml
+++ b/.github/ISSUE_TEMPLATE/1_element_detection_bug.yml
@@ -131,4 +131,3 @@ body:
$ python /app/browser-use/examples/browser/real_browser.py
DEBUG [browser] 🌎 Initializing new browser
DEBUG [agent] Version: 0.1.46-9-g62760ba, Source: git
-
diff --git a/.gitignore b/.gitignore
index ffa0cf9ef..bb307147d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,4 +55,4 @@ token.json
!docs/docs.json
-temp-profile-*
\ No newline at end of file
+temp-profile-*
diff --git a/browser_use/dom/playground/extraction.py b/browser_use/dom/playground/extraction.py
index f306c6fb6..cd4f6ad27 100644
--- a/browser_use/dom/playground/extraction.py
+++ b/browser_use/dom/playground/extraction.py
@@ -20,7 +20,6 @@ TIMEOUT = 60
async def test_focus_vs_all_elements():
- # async with async_patchright() as patchright:
browser_session = BrowserSession(
browser_profile=BrowserProfile(
# executable_path='/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
diff --git a/docs/customize/agent/all-parameters.mdx b/docs/customize/agent/all-parameters.mdx
index 66dd77e0c..5f4469f67 100644
--- a/docs/customize/agent/all-parameters.mdx
+++ b/docs/customize/agent/all-parameters.mdx
@@ -50,4 +50,4 @@ mode: "wide"
### Backwards Compatibility
- `controller`: Alias for `tools` for backwards compatibility.
-- `browser_session`: Alias for `browser` for backwards compatibility.
\ No newline at end of file
+- `browser_session`: Alias for `browser` for backwards compatibility.
diff --git a/docs/customize/agent/supported-models.mdx b/docs/customize/agent/supported-models.mdx
index 88a7b0d40..3af6dd826 100644
--- a/docs/customize/agent/supported-models.mdx
+++ b/docs/customize/agent/supported-models.mdx
@@ -216,4 +216,3 @@ We support all other models that can be called via OpenAI compatible API. We are
- [DeepSeek](https://github.com/browser-use/browser-use/blob/main/examples/models/deepseek-chat.py)
- [Novita](https://github.com/browser-use/browser-use/blob/main/examples/models/novita.py)
- [OpenRouter](https://github.com/browser-use/browser-use/blob/main/examples/models/openrouter.py)
-
diff --git a/docs/customize/browser/all-parameters.mdx b/docs/customize/browser/all-parameters.mdx
index 144e334a2..bfd7063b6 100644
--- a/docs/customize/browser/all-parameters.mdx
+++ b/docs/customize/browser/all-parameters.mdx
@@ -97,4 +97,4 @@ browser = Browser(browser_profile=profile)
## Browser vs BrowserSession
`Browser` is an alias for `BrowserSession` - they are exactly the same class:
-Use `Browser` for cleaner, more intuitive code.
\ No newline at end of file
+Use `Browser` for cleaner, more intuitive code.
diff --git a/docs/customize/browser/real-browser.mdx b/docs/customize/browser/real-browser.mdx
index 904ff44f9..2740e792f 100644
--- a/docs/customize/browser/real-browser.mdx
+++ b/docs/customize/browser/real-browser.mdx
@@ -54,4 +54,4 @@ user_data_dir='%LOCALAPPDATA%\\Google\\Chrome\\User Data'
# Linux
executable_path='/usr/bin/google-chrome'
user_data_dir='~/.config/google-chrome'
-```
\ No newline at end of file
+```
diff --git a/docs/customize/examples/chain-agents.mdx b/docs/customize/examples/chain-agents.mdx
index ff5e3f6a6..0a6c10a34 100644
--- a/docs/customize/examples/chain-agents.mdx
+++ b/docs/customize/examples/chain-agents.mdx
@@ -42,4 +42,4 @@ if __name__ == '__main__':
<Note>
The browser session remains active throughout the entire chain, preserving all cookies, local storage, and page state.
-</Note>
\ No newline at end of file
+</Note>
diff --git a/docs/customize/examples/more-examples.mdx b/docs/customize/examples/more-examples.mdx
index 87998379d..53d9596dc 100644
--- a/docs/customize/examples/more-examples.mdx
+++ b/docs/customize/examples/more-examples.mdx
@@ -12,4 +12,3 @@ mode: "wide"
### 🤝 Contributing Examples
Have a great use case? **[Submit a pull request](https://github.com/browser-use/browser-use/pulls)** with your example!
-
diff --git a/docs/customize/tools/available.mdx b/docs/customize/tools/available.mdx
index 2ac63876d..2c8e0967e 100644
--- a/docs/customize/tools/available.mdx
+++ b/docs/customize/tools/available.mdx
@@ -40,4 +40,3 @@ mode: "wide"
### Task Completion
- **`done`** - Complete the task (always available)
-
diff --git a/docs/customize/tools/basics.mdx b/docs/customize/tools/basics.mdx
index bb1f036b8..49360df8e 100644
--- a/docs/customize/tools/basics.mdx
+++ b/docs/customize/tools/basics.mdx
@@ -25,4 +25,3 @@ agent = Agent(
tools=tools,
)
```
-
diff --git a/docs/customize/tools/remove.mdx b/docs/customize/tools/remove.mdx
index 6474d5552..2d29d9970 100644
--- a/docs/customize/tools/remove.mdx
+++ b/docs/customize/tools/remove.mdx
@@ -12,4 +12,3 @@ from browser_use import Tools
tools = Tools(exclude_actions=['search_google', 'wait'])
agent = Agent(task='...', llm=llm, tools=tools)
```
-
diff --git a/docs/customize/tools/response.mdx b/docs/customize/tools/response.mdx
index 4fa546ac0..53f3ef6e5 100644
--- a/docs/customize/tools/response.mdx
+++ b/docs/customize/tools/response.mdx
@@ -77,5 +77,3 @@ def finish_task() -> ActionResult:
success=True # Task succeeded
)
```
-
-
diff --git a/docs/docs.json b/docs/docs.json
index 4dab4db6a..869b20a3e 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -207,4 +207,4 @@
"linkedin": "https://linkedin.com/company/browser-use"
}
}
-}
\ No newline at end of file
+}
diff --git a/docs/quickstart_llm.mdx b/docs/quickstart_llm.mdx
index b63d60b4a..5448aced2 100644
--- a/docs/quickstart_llm.mdx
+++ b/docs/quickstart_llm.mdx
@@ -8,4 +8,3 @@ icon: "brain"
1. Copy all content [🔗 from here](https://docs.browser-use.com/llms-full.txt) (~40k tokens)
2. Paste it into your favorite coding agent (Cursor, Claude, ChatGPT ...).
-
diff --git a/tests/ci/evaluate_tasks.py b/tests/ci/evaluate_tasks.py
index 687eeb5d2..6f06e5bbb 100644
--- a/tests/ci/evaluate_tasks.py
+++ b/tests/ci/evaluate_tasks.py
@@ -71,7 +71,7 @@ async def run_single_task(task_file):
headless=True,
user_data_dir=None,
chromium_sandbox=False, # Disable sandbox for CI environment (GitHub Actions)
- stealth=True, # Use patchright+chrome
+ stealth=True, #
)
session = BrowserSession(browser_profile=profile)
print('[DEBUG] Browser session created', file=sys.stderr)
diff --git a/tests/ci/test_browser_watchdog_aboutblank.py b/tests/ci/test_browser_watchdog_aboutblank.py
index 07343c517..058a3ac0f 100644
--- a/tests/ci/test_browser_watchdog_aboutblank.py
+++ b/tests/ci/test_browser_watchdog_aboutblank.py
@@ -4,7 +4,6 @@ import asyncio
import pytest
-from browser_use.browser.watchdogs.crash_watchdog import CrashWatchdog
from browser_use.browser.events import (
AboutBlankDVDScreensaverShownEvent,
BrowserConnectedEvent,
@@ -15,6 +14,7 @@ from browser_use.browser.events import (
)
from browser_use.browser.profile import BrowserProfile
from browser_use.browser.session import BrowserSession
+from browser_use.browser.watchdogs.crash_watchdog import CrashWatchdog
@pytest.mark.asyncio
diff --git a/tests/ci/test_radio_buttons.py b/tests/ci/test_radio_buttons.py
index 2a58b202d..b1ea15d92 100644
--- a/tests/ci/test_radio_buttons.py
+++ b/tests/ci/test_radio_buttons.py
@@ -30,7 +30,7 @@ def http_server():
# Read the HTML file content
html_file = Path(__file__).parent / 'test_radio_buttons.html'
- with open(html_file, 'r') as f:
+ with open(html_file) as f:
html_content = f.read()
# Add route for radio buttons test page