Skip to content

Commit 2930461

Browse files
committed
[java] Remove deprecated "version" JWP capability
1 parent dfe0784 commit 2930461

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

java/src/org/openqa/selenium/Capabilities.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ default Platform getPlatformName() {
5555
}
5656

5757
default String getBrowserVersion() {
58-
return String.valueOf(Optional.ofNullable(getCapability("browserVersion")).orElse(
59-
Optional.ofNullable(getCapability("version")).orElse("")));
58+
return String.valueOf(Optional.ofNullable(getCapability("browserVersion")).orElse(""));
6059
}
6160

6261
/**

java/src/org/openqa/selenium/remote/CapabilityType.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ public interface CapabilityType {
3737
*/
3838
@Deprecated
3939
String TAKES_SCREENSHOT = "takesScreenshot";
40-
/**
41-
* @deprecated Use {@link CapabilityType#BROWSER_VERSION}
42-
*/
43-
@Deprecated
44-
String VERSION = "version";
4540
/**
4641
* @deprecated Non W3C compliant
4742
*/

java/test/org/openqa/selenium/grid/data/DefaultSlotMatcherTest.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -262,21 +262,6 @@ void shouldNotMatchIfRequestedBrowserVersionIsMissingFromStereotype() {
262262
assertThat(slotMatcher.matches(stereotype, capabilities)).isFalse();
263263
}
264264

265-
@Test
266-
void matchesWithJsonWireProtocolCaps() {
267-
Capabilities stereotype = new ImmutableCapabilities(
268-
CapabilityType.BROWSER_NAME, "chrome",
269-
CapabilityType.BROWSER_VERSION, "80",
270-
CapabilityType.PLATFORM_NAME, Platform.WINDOWS
271-
);
272-
Capabilities capabilities = new ImmutableCapabilities(
273-
CapabilityType.BROWSER_NAME, "chrome",
274-
CapabilityType.VERSION, "80",
275-
CapabilityType.PLATFORM, Platform.WINDOWS
276-
);
277-
assertThat(slotMatcher.matches(stereotype, capabilities)).isTrue();
278-
}
279-
280265
@Test
281266
void shouldNotMatchCapabilitiesThatAreDifferentButDoNotContainCommonCapabilityNames() {
282267
Capabilities stereotype = new ImmutableCapabilities("acceptInsecureCerts", "true");

0 commit comments

Comments
 (0)