File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
java/client/src/org/openqa/selenium/firefox/internal
py/selenium/webdriver/firefox Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ private static File locateFirefoxBinaryFromPlatform() {
160
160
161
161
} else if (current .is (MAC )) {
162
162
binary = new File ("/Applications/Firefox.app/Contents/MacOS/firefox-bin" );
163
+ // fall back to homebrew install location if default is not found
164
+ if (!binary .exists ()) {
165
+ binary = new File (System .getProperty ("user.home" ) + binary .getAbsolutePath ());
166
+ }
163
167
}
164
168
165
169
if (binary != null && binary .exists ()) {
Original file line number Diff line number Diff line change @@ -143,7 +143,10 @@ def _get_firefox_start_cmd(self):
143
143
"""Return the command to start firefox."""
144
144
start_cmd = ""
145
145
if platform .system () == "Darwin" :
146
- start_cmd = ("/Applications/Firefox.app/Contents/MacOS/firefox-bin" )
146
+ start_cmd = "/Applications/Firefox.app/Contents/MacOS/firefox-bin"
147
+ # fallback to homebrew installation for mac users
148
+ if not os .path .exists (start_cmd ):
149
+ start_cmd = os .path .expanduser ("~" ) + start_cmd
147
150
elif platform .system () == "Windows" :
148
151
start_cmd = (self ._find_exe_in_registry () or
149
152
self ._default_windows_location ())
You can’t perform that action at this time.
0 commit comments