From a1244406a85ac86f09e0ae690599f3cfa29e2a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boni=20Garc=C3=ADa?= Date: Wed, 30 Aug 2023 18:46:36 +0200 Subject: [PATCH] [java] Remove browserVersion from options in SM Java wrapper (fix #12633) (#12639) --- java/src/org/openqa/selenium/manager/SeleniumManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index 4d8e629643b22..382350d7f7bea 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -31,10 +31,12 @@ import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.logging.Level; import java.util.logging.Logger; import org.openqa.selenium.Beta; import org.openqa.selenium.Capabilities; +import org.openqa.selenium.MutableCapabilities; import org.openqa.selenium.Platform; import org.openqa.selenium.Proxy; import org.openqa.selenium.WebDriverException; @@ -256,6 +258,7 @@ public Result getDriverPath(Capabilities options, boolean offline) { if (!options.getBrowserVersion().isEmpty()) { arguments.add("--browser-version"); arguments.add(options.getBrowserVersion()); + ((MutableCapabilities) options).setCapability("browserVersion", Optional.empty()); } String browserBinary = getBrowserBinary(options);