Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am beginner to webdriver. I have setup all configurations. I am using firefox 27.0.1 version with selenium jar files 2.40.0. I have written code to open firefox browser with a URL. I am unable to run the code and got the below error. Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be Mac. It seems i should specify the firefox path to run the code. I tried to find the location on my mac. All i get is /Users/sathiyarengarajan/Library/Application Support/Firefox/Profiles. Tell me how to get the exact path on mac machine.

share|improve this question

The typical location of FF is /Users/username/Applications/Firefox

To confirm the location right click on a FF shortcut and select "Get info". The dialog box displays.

share|improve this answer
I tried using Get info. Still I am only able to get the same above. I tried even Firefox help->troubleshoot information->Application Basics->Profile folder->show it in Finder. Any help to get the exact location would be helpful – STE Mar 3 '14 at 17:06
Why don't you just search the HD for Firefox? Use the search in Finder. – Merch Mar 3 '14 at 17:12
I tried. I got /Users/sathiyarengarajan/Downloads/Firefox 27.0.1.dmg. But still it didnt help. I uninstalled the firefox application. Once firefox is downloaded, i copied the firefox to the applications folder. Now I no need to set firefox path for selenium. Now things work – STE Mar 4 '14 at 11:06
No you should be good now, the applications folder is Selemiums default location for Firefox. – Merch Mar 4 '14 at 18:09

Not quite the same problem, but since I found this answer when googling, I'm providing my solution here too.

I'm trying to find the firefox executable to execute it from scripts like cucumber / selenium tests without hardcoding the path. Here's what I do:

Find it with Spotlight

firefox_paths = %x[mdfind "kMDItemFSName ="]
firefox_path = firefox_paths.split('\n').first.chomp
firefox_executable_path = File.join(firefox_path, '/Contents/MacOS/firefox')


Another way would be to dump launch services database and grep it out there

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump \
  | grep -n7 org.mozilla.firefox \
  | grep path: \
  | awk '{ print($3) }'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.