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)
|
|
If everything is setup, Firefox will open a new browser
To finish this test type driver.get("http://www.damien.co")
To exit Python type exit()
and press enter.
Read more from my blog for an introduction and quick tips on developing in Hugo or UCTD.