Skip to content

Commit 59055b3

Browse files
committed
[java] Deprecating VERSION to favour BROWSER_VERSION
[skip ci]
1 parent 4a1bc4c commit 59055b3

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,20 @@
2121
* Commonly seen remote webdriver capabilities.
2222
*/
2323
public interface CapabilityType {
24+
2425
String BROWSER_NAME = "browserName";
25-
@Deprecated String PLATFORM = "platform";
26+
/**
27+
* @deprecated Use {@link CapabilityType#PLATFORM_NAME}
28+
*/
29+
@Deprecated
30+
String PLATFORM = "platform";
2631
String PLATFORM_NAME = "platformName";
2732
String SUPPORTS_JAVASCRIPT = "javascriptEnabled";
2833
String TAKES_SCREENSHOT = "takesScreenshot";
34+
/**
35+
* @deprecated Use {@link CapabilityType#BROWSER_VERSION}
36+
*/
37+
@Deprecated
2938
String VERSION = "version";
3039
String BROWSER_VERSION = "browserVersion";
3140
String SUPPORTS_ALERTS = "handlesAlerts";

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,9 @@
2929
import org.openqa.selenium.Platform;
3030

3131
import java.util.Map;
32-
import java.util.logging.Logger;
3332

3433
public class DesiredCapabilities extends MutableCapabilities {
3534

36-
private static final Logger LOG = Logger.getLogger(Capabilities.class.getName());
37-
3835
public DesiredCapabilities(String browser, String version, Platform platform) {
3936
setCapability(BROWSER_NAME, browser);
4037
setCapability(VERSION, version);
@@ -63,6 +60,11 @@ public DesiredCapabilities(Capabilities... others) {
6360
}
6461
}
6562

63+
@Deprecated
64+
public static DesiredCapabilities htmlUnit() {
65+
return new DesiredCapabilities(HTMLUNIT.browserName(), "", Platform.ANY);
66+
}
67+
6668
public void setBrowserName(String browserName) {
6769
setCapability(BROWSER_NAME, browserName);
6870
}
@@ -110,9 +112,4 @@ public DesiredCapabilities merge(Capabilities extraCapabilities) {
110112
}
111113
return this;
112114
}
113-
114-
@Deprecated
115-
public static DesiredCapabilities htmlUnit() {
116-
return new DesiredCapabilities(HTMLUNIT.browserName(), "", Platform.ANY);
117-
}
118115
}

0 commit comments

Comments
 (0)