Skip to content

Commit 2a8d42c

Browse files
authored
Merge branch 'trunk' into java_bidi_emulation
2 parents 26a1129 + c896d2d commit 2a8d42c

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

common/selenium_manager.bzl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ def selenium_manager():
66
http_file(
77
name = "download_sm_linux",
88
executable = True,
9-
sha256 = "50099355b0e74b8bb231a5b152fc3de498dcde1cdebcefb1e501713e9b124b9d",
10-
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-0ab9b6d/selenium-manager-linux",
9+
sha256 = "f615ae2eea714a54e322f8945c7abb19e03e0f5d651b464bd5cd9e9ecf9e7c90",
10+
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-9d09338/selenium-manager-linux",
1111
)
1212

1313
http_file(
1414
name = "download_sm_macos",
1515
executable = True,
16-
sha256 = "eb98ce344acfaee3a7d58038331a8b49985ac724d2a9ec02258008c076979846",
17-
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-0ab9b6d/selenium-manager-macos",
16+
sha256 = "88fede46d14991930aab3176f6938ddb7549ab244f6d75a9745050d625274852",
17+
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-9d09338/selenium-manager-macos",
1818
)
1919

2020
http_file(
2121
name = "download_sm_windows",
2222
executable = True,
23-
sha256 = "7090d5737aebabb9daad49022b070d3456b8e43ae7f3ac5bcb780af67c371b3f",
24-
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-0ab9b6d/selenium-manager-windows.exe",
23+
sha256 = "a7e8a7e0f561e7d8238f8aa884ef2dd6235884d3b0e97f25061747dbf4ec5037",
24+
url = "https://github.com/SeleniumHQ/selenium_manager_artifacts/releases/download/selenium-manager-9d09338/selenium-manager-windows.exe",
2525
)
2626

2727
def _selenium_manager_artifacts_impl(_ctx):

py/test/selenium/webdriver/common/bidi_webextension_tests.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,18 +132,30 @@ def chromium_driver(self, chromium_options, request):
132132

133133
if driver_option == "chrome":
134134
browser_class = webdriver.Chrome
135+
browser_service = webdriver.ChromeService
135136
elif driver_option == "edge":
136137
browser_class = webdriver.Edge
138+
browser_service = webdriver.EdgeService
137139

138-
temp_dir = tempfile.mkdtemp(prefix="chrome-profile-")
140+
temp_dir = tempfile.mkdtemp(prefix="chromium-profile-")
139141

140142
chromium_options.enable_bidi = True
141143
chromium_options.enable_webextensions = True
142144
chromium_options.add_argument(f"--user-data-dir={temp_dir}")
143145
chromium_options.add_argument("--no-sandbox")
144146
chromium_options.add_argument("--disable-dev-shm-usage")
145147

146-
chromium_driver = browser_class(options=chromium_options)
148+
binary = request.config.option.binary
149+
if binary:
150+
chromium_options.binary_location = binary
151+
152+
executable = request.config.option.executable
153+
if executable:
154+
service = browser_service(executable_path=executable)
155+
else:
156+
service = browser_service()
157+
158+
chromium_driver = browser_class(options=chromium_options, service=service)
147159

148160
yield chromium_driver
149161
chromium_driver.quit()

0 commit comments

Comments
 (0)