This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new e1f5c49df7 fix: Allows configuration of Selenium Webdriver binary
(#33103)
e1f5c49df7 is described below
commit e1f5c49df7f59d101b679bbcce3060254c4d6756
Author: Michael S. Molina <[email protected]>
AuthorDate: Mon Apr 14 08:11:02 2025 -0300
fix: Allows configuration of Selenium Webdriver binary (#33103)
---
superset/config.py | 2 +-
superset/utils/webdriver.py | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/superset/config.py b/superset/config.py
index cd5393569e..a82c080b42 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -1525,7 +1525,7 @@ WEBDRIVER_AUTH_FUNC = None
# Any config options to be passed as-is to the webdriver
WEBDRIVER_CONFIGURATION = {
- "options": {"capabilities": {}, "preferences": {}},
+ "options": {"capabilities": {}, "preferences": {}, "binary_location": ""},
"service": {"log_output": "/dev/null", "service_args": [], "port": 0,
"env": {}},
}
diff --git a/superset/utils/webdriver.py b/superset/utils/webdriver.py
index f9a7899ff9..8493a1f364 100644
--- a/superset/utils/webdriver.py
+++ b/superset/utils/webdriver.py
@@ -275,6 +275,10 @@ class WebDriverSelenium(WebDriverProxy):
# Add additional configured webdriver options
webdriver_conf = dict(current_app.config["WEBDRIVER_CONFIGURATION"])
+ # Set the binary location if provided
+ # We need to pop it from the dict due to selenium_version < 4.10.0
+ options.binary_location = webdriver_conf.pop("binary_location", "")
+
if version.parse(selenium_version) < version.parse("4.10.0"):
kwargs |= webdriver_conf
else: