diff --git a/java/src/org/openqa/selenium/Capabilities.java b/java/src/org/openqa/selenium/Capabilities.java index 7fc6d84e4b33d..43db800b08a95 100644 --- a/java/src/org/openqa/selenium/Capabilities.java +++ b/java/src/org/openqa/selenium/Capabilities.java @@ -55,8 +55,7 @@ default Platform getPlatformName() { } default String getBrowserVersion() { - return String.valueOf(Optional.ofNullable(getCapability("browserVersion")).orElse( - Optional.ofNullable(getCapability("version")).orElse(""))); + return String.valueOf(Optional.ofNullable(getCapability("browserVersion")).orElse("")); } /** diff --git a/java/src/org/openqa/selenium/remote/CapabilityType.java b/java/src/org/openqa/selenium/remote/CapabilityType.java index 036138b56bb12..96c7f3fee80ae 100644 --- a/java/src/org/openqa/selenium/remote/CapabilityType.java +++ b/java/src/org/openqa/selenium/remote/CapabilityType.java @@ -37,11 +37,6 @@ public interface CapabilityType { */ @Deprecated String TAKES_SCREENSHOT = "takesScreenshot"; - /** - * @deprecated Use {@link CapabilityType#BROWSER_VERSION} - */ - @Deprecated - String VERSION = "version"; /** * @deprecated Non W3C compliant */ diff --git a/java/test/org/openqa/selenium/grid/data/DefaultSlotMatcherTest.java b/java/test/org/openqa/selenium/grid/data/DefaultSlotMatcherTest.java index 006f47860596e..2235567151230 100644 --- a/java/test/org/openqa/selenium/grid/data/DefaultSlotMatcherTest.java +++ b/java/test/org/openqa/selenium/grid/data/DefaultSlotMatcherTest.java @@ -262,21 +262,6 @@ void shouldNotMatchIfRequestedBrowserVersionIsMissingFromStereotype() { assertThat(slotMatcher.matches(stereotype, capabilities)).isFalse(); } - @Test - void matchesWithJsonWireProtocolCaps() { - Capabilities stereotype = new ImmutableCapabilities( - CapabilityType.BROWSER_NAME, "chrome", - CapabilityType.BROWSER_VERSION, "80", - CapabilityType.PLATFORM_NAME, Platform.WINDOWS - ); - Capabilities capabilities = new ImmutableCapabilities( - CapabilityType.BROWSER_NAME, "chrome", - CapabilityType.VERSION, "80", - CapabilityType.PLATFORM, Platform.WINDOWS - ); - assertThat(slotMatcher.matches(stereotype, capabilities)).isTrue(); - } - @Test void shouldNotMatchCapabilitiesThatAreDifferentButDoNotContainCommonCapabilityNames() { Capabilities stereotype = new ImmutableCapabilities("acceptInsecureCerts", "true");