How to install Selenium WebDriver on Mac OS X 10.7.5 supporting Chrome, Firefox and safari ? What I have to set, where to install.
-
4This post is currently the top hit on a Google search for "install selenium mac," so here's an updated link (the one above appears to be broken): https://selenium-python.readthedocs.io/installation.html – Jaime Sep 09 '17 at 22:20
5 Answers
Install
If you use homebrew (which I recommend), you can install selenium using:
brew install selenium-server
Running
updated -port port_number
To run selenium, do: selenium-server -port 4444
For more options: selenium-server -help
-
2To start selenium automatically: `brew services start selenium-server-standalone` – Jimothy Jan 16 '19 at 22:51
-
3
-
2
-
Mac already has Python and a package manager called easy_install
, so open Terminal and type
sudo easy_install selenium

- 8,765
- 9
- 49
- 56

- 1,625
- 2
- 23
- 32
-
4This works but assumes that you want to run Selenium with Python. If that is what you want see http://damien.co/resources/how-to-install-selenium-2-mac-os-x-python-7391 Typically I think what people are looking for though is how to run the Selenium Standalone Server from the command line so it is available use by other scripts. – chrowe Jun 14 '16 at 13:04
-
1If you need to uninstall the python version of selenium: 1. sudo easy_install -m selenium 2. sudo rm -rf /Library/Python/2.7/site-packages/selenium-3.11.0-py2.7.egg (file name may vary, depending on version) – Red Rooster Mar 20 '18 at 01:58
To use the java -jar selenium-server-standalone-2.45.0.jar
command-line tool you need to install a JDK.
You need to download and install the JDK and the standalone selenium server.

- 8,765
- 9
- 49
- 56

- 133
- 3
- 5
-
2This is what I was looking for but it is not clear where to get the jar file from. The current version on http://www.seleniumhq.org/download/ does not seem to work for me running OS X 10.11.5 El Capitan. This guide worked though: http://damien.co/resources/how-to-get-started-selenium-2-mac-os-x-java-7403 – chrowe Jun 14 '16 at 16:56
First up you need to download Selenium jar files from http://www.seleniumhq.org/download/. Then you'd need an IDE, something like IntelliJ or Eclipse. Then you'll have to map your jar files to those IDEs. Then depending on which language/framework you choose, you'll have to download the relevant library files, for example, if you're using JUnit you'll have to download Junit 4.11 jar file. Finally don't forget to download the drivers for Chrome and Safari (firefox driver comes standard with selenium). Once done, you can start coding and testing your code with the browser of your choice.

- 174
- 2
- 11
I installed Selenium web driver (for Chrome) by first:
- downloading the appropriate web driver from here.
- then navigated to mac's folder
/usr/local/bin
and pasted the downloaded web driver there. - Afterwards just ran the file there by double clicking it.
The file was installed there so that we do not have to specify the WebDriver path when instantiating the browser. For more detailed walkthrough, you can reference from here.

- 441
- 5
- 11