Skip to content

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

Refactor Chrome detection logic in BrowserProfile class

kalil03214da80bf15df6
diff --git a/browser_use/browser/profile.py b/browser_use/browser/profile.py
index a347a7942..23ddf43fd 100644
--- a/browser_use/browser/profile.py
+++ b/browser_use/browser/profile.py
@@ -787,7 +787,7 @@ class BrowserProfile(BrowserConnectArgs, BrowserLaunchPersistentContextArgs, Bro
is_chrome = (
'chrome' in user_data_str.lower()
- or (self.executable_path and 'chrome' in self.executable_path.name.lower())
+ or ('chrome' in str(self.executable_path).lower())
or self.channel
in (BrowserChannel.CHROME, BrowserChannel.CHROME_BETA, BrowserChannel.CHROME_DEV, BrowserChannel.CHROME_CANARY)
)