File tree Expand file tree Collapse file tree
java/client/src/org/openqa/selenium/firefox/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,8 +121,11 @@ private static File locateFirefoxBinaryFromPlatform() {
121121
122122 Platform current = Platform .getCurrent ();
123123 if (current .is (WINDOWS )) {
124- binary =
125- findExistingBinary (WindowsUtils .getPathsInProgramFiles ("Mozilla Firefox\\ firefox.exe" ));
124+ ImmutableList .Builder <String > paths = new ImmutableList .Builder <>();
125+ paths .addAll (WindowsUtils .getPathsInProgramFiles ("Mozilla Firefox\\ firefox.exe" ));
126+ paths .addAll (WindowsUtils .getPathsInProgramFiles ("Firefox Developer Edition\\ firefox.exe" ));
127+ paths .addAll (WindowsUtils .getPathsInProgramFiles ("Nightly\\ firefox.exe" ));
128+ binary = findExistingBinaries (paths .build ()).stream ().findFirst ().orElse (null );
126129
127130 } else if (current .is (MAC )) {
128131 binary = new File ("/Applications/Firefox.app/Contents/MacOS/firefox-bin" );
@@ -151,13 +154,14 @@ private static File locateFirefoxBinaryFromPlatform() {
151154 return null ;
152155 }
153156
154- private static File findExistingBinary (final ImmutableList <String > paths ) {
157+ private static ImmutableList <File > findExistingBinaries (final ImmutableList <String > paths ) {
158+ ImmutableList .Builder <File > found = new ImmutableList .Builder <>();
155159 for (String path : paths ) {
156160 File file = new File (path );
157161 if (file .exists ()) {
158- return file ;
162+ found . add ( file ) ;
159163 }
160164 }
161- return null ;
165+ return found . build () ;
162166 }
163167}
You can’t perform that action at this time.
0 commit comments