Skip to content

Commit ab18234

Browse files
committed
[java] Deprecating FirefoxBinary
It is not needed anymore, as users can provide the browser binary path with a `Path` or a `String`.
1 parent 56d149e commit ab18234

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

java/src/org/openqa/selenium/firefox/FirefoxBinary.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@
3838
import org.openqa.selenium.WebDriverException;
3939
import org.openqa.selenium.os.ExecutableFinder;
4040

41+
/**
42+
* A wrapper around Firefox's binary. This allows us to locate the binary in a portable way.
43+
*
44+
* @deprecated Use {@link FirefoxOptions#setBinary(Path)} or {@link
45+
* FirefoxOptions#setBinary(String)} instead.
46+
*/
4147
public class FirefoxBinary {
4248

4349
/** Enumerates Firefox channels, according to https://wiki.mozilla.org/RapidRelease */
@@ -178,7 +184,7 @@ static Executable locateFirefoxBinaryFromSystemProperty() {
178184
if (!binaryName.endsWith(".app")) {
179185
binaryName += ".app";
180186
}
181-
binaryName += "/Contents/MacOS/firefox-bin";
187+
binaryName += "/Contents/MacOS/firefox";
182188
}
183189

184190
binary = new File(binaryName);
@@ -210,7 +216,7 @@ private static Stream<Executable> locateFirefoxBinariesFromPlatform() {
210216

211217
} else if (current.is(MAC)) {
212218
// system
213-
File binary = new File("/Applications/Firefox.app/Contents/MacOS/firefox-bin");
219+
File binary = new File("/Applications/Firefox.app/Contents/MacOS/firefox");
214220
if (binary.exists()) {
215221
executables.add(new Executable(binary));
216222
}
@@ -222,7 +228,7 @@ private static Stream<Executable> locateFirefoxBinariesFromPlatform() {
222228
}
223229

224230
} else if (current.is(UNIX)) {
225-
String systemFirefoxBin = new ExecutableFinder().find("firefox-bin");
231+
String systemFirefoxBin = new ExecutableFinder().find("firefox");
226232
if (systemFirefoxBin != null) {
227233
executables.add(new Executable(new File(systemFirefoxBin)));
228234
}

0 commit comments

Comments
 (0)