Skip to content

Instantly share code, notes, and snippets.

Created Feb 20, 2010
What would you like to do?
fabric stub for getting selenium 2 python bindings to install
def _install_webdriver(venv_path):
Install/build the python webdriver client. The is busted, so we have
to do extra work beyond the virtualenv.
webdriver_dir = os.path.join(venv_path, 'src', 'webdriver')
py_bin = os.path.join(venv_path, 'bin', 'python')
with cd(webdriver_dir):
# Build webdriver
run('rake firefox_xpi')
run('%s build' % py_bin)
run('mkdir build/lib/webdriver/build_artifacts')
run('cp build/ build/lib/webdriver/build_artifacts/')
# Install the webdriver client to the virtualenv
run('deactivate ; source %s && add2virtualenv %s' % (
os.path.join(venv_path, 'bin/activate'),
os.path.join(venv_path, 'src/webdriver/build/lib')), pty=True)
sudo('chown -R hudson:policystat %s' % webdriver_dir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment