Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.44.0"
__version__ = "4.44.1"
15 changes: 10 additions & 5 deletions seleniumbase/core/browser_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -2618,15 +2618,20 @@ def _set_chrome_options(
if is_using_uc(undetectable, browser_name):
chrome_options.add_argument("--disable-application-cache")
chrome_options.add_argument("--disable-setuid-sandbox")
if not binary_location:
if not binary_location:
if os.path.exists("/bin/google-chrome"):
binary_location = "/bin/google-chrome"
elif os.path.exists("/usr/bin/google-chrome-stable"):
binary_location = "/usr/bin/google-chrome-stable"
elif os.path.exists("/usr/bin/google-chrome"):
binary_location = "/usr/bin/google-chrome"
elif os.path.exists("/usr/bin/google-chrome-stable"):
binary_location = "/usr/bin/google-chrome-stable"
else:
br_app = "google-chrome"
binary_loc = detect_b_ver.get_binary_location(br_app, True)
if os.path.exists(binary_loc):
binary_location = binary_loc
elif os.path.exists("/usr/bin/google-chrome-stable"):
binary_location = "/usr/bin/google-chrome-stable"
elif os.path.exists("/usr/bin/google-chrome"):
binary_location = "/usr/bin/google-chrome"
extra_disabled_features = []
if chromium_arg:
# Can be a comma-separated list of Chromium args or a list
Expand Down
47 changes: 39 additions & 8 deletions seleniumbase/core/detect_b_ver.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,22 @@ def chrome_on_linux_path(chromium_ok=False, browser_type=None):
return ""
if os_name() != OSType.LINUX:
return ""
paths = ["/bin/google-chrome", "/bin/google-chrome-stable"]
paths = [
"/bin/google-chrome",
"/bin/google-chrome-stable",
"/usr/bin/google-chrome",
"/usr/bin/google-chrome-stable"
]
for path in paths:
if os.path.exists(path) and os.access(path, os.X_OK):
return path
try:
if (
os.path.exists(path)
and os.access(path, os.R_OK)
and os.access(path, os.X_OK)
):
return path
except Exception:
pass
paths = os.environ["PATH"].split(os.pathsep)
binaries = []
binaries.append("google-chrome")
Expand All @@ -122,13 +134,32 @@ def chrome_on_linux_path(chromium_ok=False, browser_type=None):
for binary in binaries:
for path in paths:
full_path = os.path.join(path, binary)
if os.path.exists(full_path) and os.access(full_path, os.X_OK):
return full_path
try:
if (
os.path.exists(full_path)
and os.access(full_path, os.R_OK)
and os.access(full_path, os.X_OK)
):
return full_path
except Exception:
pass
if chromium_ok:
paths = ["/bin/chromium", "/bin/chromium-browser"]
paths = [
"/bin/chromium",
"/bin/chromium-browser",
"/usr/bin/chromium",
"/usr/bin/chromium-browser"
]
for path in paths:
if os.path.exists(path) and os.access(path, os.X_OK):
return path
try:
if (
os.path.exists(path)
and os.access(path, os.R_OK)
and os.access(path, os.X_OK)
):
return path
except Exception:
pass
return "/usr/bin/google-chrome"


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
],
# pip install -e .[psutil]
"psutil": [
"psutil==7.1.0",
"psutil==7.1.2",
],
# pip install -e .[pyautogui]
# (Already a required dependency on Linux now.)
Expand Down