Skip to content

Commit 31020e4

Browse files
authored
Merge pull request #2413 from seleniumbase/welcome-to-2024
Welcome to 2024
2 parents 36d410b + bf86281 commit 31020e4

File tree

8 files changed

+24
-12
lines changed

8 files changed

+24
-12
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2023 Michael Mintz
3+
Copyright (c) 2014-2024 Michael Mintz
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

examples/shadow_root_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ def test_shadow_root(self):
1111
message = "Skipping test in Recorder Mode."
1212
print(message)
1313
self.skip(message)
14-
elif self.browser == "safari":
14+
elif not self.is_chromium():
1515
self.open_if_not_url("about:blank")
16-
message = "Skipping test for using Safari."
16+
message = "This test is only for Chromium browsers!"
1717
print(message)
1818
self.skip(message)
1919
self.open("https://seleniumbase.io/other/shadow_dom")

examples/test_cdp_ad_blocking.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44

55
class CDPNetworkBlockingTests(BaseCase):
66
def test_cdp_network_blocking(self):
7-
if not self.is_chromium:
8-
self.skip("This test is only for Chromium browsers!")
7+
self.open("about:blank")
8+
if not self.is_chromium():
9+
message = "This test is only for Chromium browsers!"
10+
print(message)
11+
self.skip(message)
912
self.execute_cdp_cmd(
1013
'Network.setBlockedURLs', {"urls": [
1114
"*googlesyndication.com*",
@@ -24,5 +27,4 @@ def test_cdp_network_blocking(self):
2427
source = self.get_page_source()
2528
self.assert_true("doubleclick.net" not in source)
2629
self.assert_true("google-analytics.com" not in source)
27-
if self.demo_mode:
28-
self.post_message("Blocking was successful!")
30+
self.post_message("Blocking was successful!")

seleniumbase/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.22.4"
2+
__version__ = "4.22.5"

seleniumbase/console_scripts/sb_install.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
DRIVER_DIR = os.path.dirname(os.path.realpath(drivers.__file__))
5151
LOCAL_PATH = "/usr/local/bin/" # On Mac and Linux systems
5252
DEFAULT_CHROMEDRIVER_VERSION = "114.0.5735.90" # (If can't find LATEST_STABLE)
53-
DEFAULT_GECKODRIVER_VERSION = "v0.33.0"
53+
DEFAULT_GECKODRIVER_VERSION = "v0.34.0"
5454
DEFAULT_EDGEDRIVER_VERSION = "115.0.1901.183" # (If can't find LATEST_STABLE)
5555

5656

seleniumbase/core/browser_launcher.py

+9
Original file line numberDiff line numberDiff line change
@@ -1816,6 +1816,9 @@ def get_remote_driver(
18161816
platform_name = desired_caps[key]
18171817
elif re.match("[a-zA-Z0-9]*:[a-zA-Z0-9]*", key):
18181818
extension_capabilities[key] = desired_caps[key]
1819+
cap_str = str(desired_caps).lower()
1820+
if "browserstack" in cap_str or "bstack" in cap_str:
1821+
chrome_options.set_capability("bstack:options", desired_caps)
18191822
chrome_options.set_capability("cloud:options", capabilities)
18201823
if selenoid:
18211824
snops = selenoid_options
@@ -1876,6 +1879,9 @@ def get_remote_driver(
18761879
platform_name = desired_caps[key]
18771880
elif re.match("[a-zA-Z0-9]*:[a-zA-Z0-9]*", key):
18781881
extension_capabilities[key] = desired_caps[key]
1882+
cap_str = str(desired_caps).lower()
1883+
if "browserstack" in cap_str or "bstack" in cap_str:
1884+
firefox_options.set_capability("bstack:options", desired_caps)
18791885
firefox_options.set_capability("cloud:options", capabilities)
18801886
if selenoid:
18811887
snops = selenoid_options
@@ -2016,6 +2022,9 @@ def get_remote_driver(
20162022
remote_options = ArgOptions()
20172023
for cap_name, cap_value in desired_caps.items():
20182024
remote_options.set_capability(cap_name, cap_value)
2025+
cap_str = str(desired_caps).lower()
2026+
if "browserstack" in cap_str or "bstack" in cap_str:
2027+
remote_options.set_capability("bstack:options", desired_caps)
20192028
driver = webdriver.Remote(
20202029
command_executor=address,
20212030
options=remote_options,

seleniumbase/fixtures/base_case.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -6918,13 +6918,14 @@ def save_element_as_image_file(
69186918
image = Image.open(image_file_path)
69196919
draw = ImageDraw.Draw(image)
69206920
draw.rectangle(
6921-
(0, 0, (max_width * 6) + 6, 16 * len_text_rows),
6921+
(0, 0, int(max_width * 8.32) + 10, 23 * len_text_rows + 2),
69226922
fill=(236, 236, 28),
69236923
)
69246924
draw.text(
69256925
(4, 2), # Coordinates
69266926
overlay_text, # Text
6927-
(8, 38, 176), # Color
6927+
fill=(8, 38, 176), # Color
6928+
font_size=18, # Font Size
69286929
)
69296930
image.save(image_file_path, "PNG", quality=100, optimize=True)
69306931

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
# (An optional library for image-processing.)
244244
"pillow": [
245245
'Pillow==9.5.0;python_version<"3.8"',
246-
'Pillow==10.1.0;python_version>="3.8"',
246+
'Pillow==10.2.0;python_version>="3.8"',
247247
],
248248
# pip install -e .[psutil]
249249
"psutil": [

0 commit comments

Comments
 (0)