Skip to content

Commit 5a271c3

Browse files
committed
java: Checking for presense of firefox-bin executable before firefox on uni[ systems
1 parent 25fe2cf commit 5a271c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: java/client/src/org/openqa/selenium/firefox/internal/Executable.java

+9
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.util.Map;
3232

3333
import static org.openqa.selenium.Platform.MAC;
34+
import static org.openqa.selenium.Platform.UNIX;
3435
import static org.openqa.selenium.Platform.WINDOWS;
3536

3637
/**
@@ -167,10 +168,18 @@ private static File locateFirefoxBinaryFromPlatform() {
167168
return binary;
168169
}
169170

171+
if (current.is(UNIX)) {
172+
String systemFirefox = CommandLine.find("firefox-bin");
173+
if (systemFirefox != null) {
174+
return new File(systemFirefox);
175+
}
176+
}
177+
170178
String systemFirefox = CommandLine.find("firefox");
171179
if (systemFirefox != null) {
172180
return new File(systemFirefox);
173181
}
182+
174183
return null;
175184
}
176185

0 commit comments

Comments
 (0)