HOW TO: Install Selenium 2 for Mac OS X / Python

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.

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

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")

Linkage

Python bindings

Install Climber – I must say this post did seem to be auto-translated into English.

Tags: , , , ,