Skip to content

Commit c6df30c

Browse files
committed
[java] do not return linux Selenium Manager by default
Log warning when Unix since it may not work Throw error when OS is unsupported
1 parent ad01c0d commit c6df30c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

java/src/org/openqa/selenium/manager/SeleniumManager.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
// under the License.
1717
package org.openqa.selenium.manager;
1818

19+
import static org.openqa.selenium.Platform.LINUX;
1920
import static org.openqa.selenium.Platform.MAC;
21+
import static org.openqa.selenium.Platform.UNIX;
2022
import static org.openqa.selenium.Platform.WINDOWS;
2123

2224
import java.io.IOException;
@@ -171,13 +173,20 @@ private synchronized Path getBinary() {
171173
if (binary == null) {
172174
try {
173175
Platform current = Platform.getCurrent();
174-
String folder = "linux";
176+
String folder = "";
175177
String extension = "";
176178
if (current.is(WINDOWS)) {
177179
extension = EXE;
178180
folder = "windows";
179181
} else if (current.is(MAC)) {
180182
folder = "macos";
183+
} else if (current.is(LINUX)) {
184+
folder = "linux";
185+
} else if (current.is(UNIX)) {
186+
LOG.warning(String.format("Selenium Manager binary may not be compatible with %s; verify settings", current));
187+
folder = "linux";
188+
} else {
189+
throw new WebDriverException("Unsupported platform: " + current);
181190
}
182191

183192
binary = getBinaryInCache(SELENIUM_MANAGER + extension);

0 commit comments

Comments
 (0)