3838import org .openqa .selenium .WebDriverException ;
3939import 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+ */
4147public 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