How to install Selenium WebDriver on Mac OS

Solution 1:

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

Solution 2:

Mac already has Python and a package manager called easy_install, so open Terminal and type

sudo easy_install selenium

Solution 3:

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.

Solution 4:

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.