File tree 1 file changed +17
-16
lines changed
java/client/src/org/openqa/selenium
1 file changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -37,28 +37,29 @@ default String getBrowserName() {
37
37
/**
38
38
* @deprecated Use {@link #getPlatformName()}
39
39
*/
40
+ @ Deprecated
40
41
default Platform getPlatform () {
41
42
return getPlatformName ();
42
43
}
43
44
44
45
default Platform getPlatformName () {
45
46
return Stream .of ("platform" , "platformName" )
46
- .map (this ::getCapability )
47
- .filter (Objects ::nonNull )
48
- .map (cap -> {
49
- if (cap instanceof Platform ) {
50
- return (Platform ) cap ;
51
- }
47
+ .map (this ::getCapability )
48
+ .filter (Objects ::nonNull )
49
+ .map (cap -> {
50
+ if (cap instanceof Platform ) {
51
+ return (Platform ) cap ;
52
+ }
52
53
53
- try {
54
- return Platform .fromString ((String .valueOf (cap )));
55
- } catch (WebDriverException e ) {
56
- return null ;
57
- }
58
- })
59
- .filter (Objects ::nonNull )
60
- .findFirst ()
61
- .orElse (null );
54
+ try {
55
+ return Platform .fromString ((String .valueOf (cap )));
56
+ } catch (WebDriverException e ) {
57
+ return null ;
58
+ }
59
+ })
60
+ .filter (Objects ::nonNull )
61
+ .findFirst ()
62
+ .orElse (null );
62
63
}
63
64
64
65
/**
@@ -71,7 +72,7 @@ default String getVersion() {
71
72
72
73
default String getBrowserVersion () {
73
74
return String .valueOf (Optional .ofNullable (getCapability ("browserVersion" )).orElse (
74
- Optional .ofNullable (getCapability ("version" )).orElse ("" )));
75
+ Optional .ofNullable (getCapability ("version" )).orElse ("" )));
75
76
}
76
77
77
78
/**
You can’t perform that action at this time.
0 commit comments