Skip to content

Commit a687d4f

Browse files
committed
[java] return friendly names for Windows platforms like Mac does
existing value of toString() is available with name()
1 parent 8b53734 commit a687d4f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

java/src/org/openqa/selenium/Platform.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public Platform family() {
4949
public Platform family() {
5050
return WINDOWS;
5151
}
52+
@Override
53+
public String toString() {
54+
return "Windows XP";
55+
}
5256
},
5357

5458
/**
@@ -59,6 +63,10 @@ public Platform family() {
5963
public Platform family() {
6064
return WINDOWS;
6165
}
66+
@Override
67+
public String toString() {
68+
return "Windows Vista";
69+
}
6270
},
6371

6472
/**
@@ -69,27 +77,43 @@ public Platform family() {
6977
public Platform family() {
7078
return WINDOWS;
7179
}
80+
@Override
81+
public String toString() {
82+
return "Windows 8";
83+
}
7284
},
7385

7486
WIN8_1("windows 8.1", "win8.1") {
7587
@Override
7688
public Platform family() {
7789
return WINDOWS;
7890
}
91+
@Override
92+
public String toString() {
93+
return "Windows 8.1";
94+
}
7995
},
8096

8197
WIN10("windows 10", "win10") {
8298
@Override
8399
public Platform family() {
84100
return WINDOWS;
85101
}
102+
@Override
103+
public String toString() {
104+
return "Windows 10";
105+
}
86106
},
87107

88108
WIN11("windows 11", "win11") {
89109
@Override
90110
public Platform family() {
91111
return WINDOWS;
92112
}
113+
@Override
114+
public String toString() {
115+
return "Windows 11";
116+
}
93117
},
94118

95119
MAC("mac", "darwin", "macOS", "mac os x", "os x") {

0 commit comments

Comments
 (0)