This is an automated email from the ASF dual-hosted git repository. michaelsmolina pushed a commit to branch 5.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit d0aa6338b827b0f49c7a8ab12901a0845a023afc Author: Michael S. Molina <[email protected]> AuthorDate: Mon Apr 14 08:11:02 2025 -0300 fix: Allows configuration of Selenium Webdriver binary (#33103) (cherry picked from commit e1f5c49df7f59d101b679bbcce3060254c4d6756) --- 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 cf29e66127..093377f656 100644 --- a/superset/config.py +++ b/superset/config.py @@ -1508,7 +1508,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:
