If you own a Mac and want to get started with Selenium for Automated Testing of your web apps, then you’re already most of the way there.

June 2020 - this article is out of date - checkout my newer posts on Automated Testing

The Mac operating system already offers a number of baked in solutions and command line tools like Python, Ruby and Java.

How To Install Selenium on your Mac OSx

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

sudo easy_install selenium

You need to run this as Sudo / Root or it can’t create the folders in protected directories.

1st Selenium Test Script from Command Line

You need to have Firefox installed for this step …

Now open another Terminal / shell and type (press enter after each command)

from selenium import webdriver
driver = webdriver.Firefox()

If everything is setup, Firefox will open a new browser

To finish this test type driver.get("")

To exit Python type exit() and press enter.

Tags: Selenium, Testing, Firefox

Read more from my blog for an introduction and quick tips on developing in Hugo or UCTD.

Meet the author

Photo for Damien Saunders
Damien Saunders
An experienced management consultant and business leader interested in digital transformation, product centred design and scaled agile. If I'm not writing about living with UCTD (an autoimmune disease), I'm probably listening to music, reading a book or learning more about wine.