WebTechKitchen; Your Web Technology Kitchen, contact us to create, or maintain your websites and other digital properties.

Installing Selenium 2 on OSX

Submitted by barnettech on Thu, 02/20/2014 - 11:09

http://damien.co/resources/how-to-install-selenium-2-mac-os-x-python-73…

Here above is a linkback to a great tutorial.  Here is the content in case the page above gets taken down (its happened before) and I need to find the notes myself.  Hopefully damien.co gets more traffic than this page, but I don't want to lose the great info in case he ever takes down his site.

 

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

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

python
from selenium import webdriver
driver = webdriver.Firefox()

If everything is setup, Firefox will open a new browser

To finish this test type

driver.get("http://www.damien.co")