Skip to content

Instantly share code, notes, and snippets.

@phihag
Last active December 14, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phihag/5117914 to your computer and use it in GitHub Desktop.
Save phihag/5117914 to your computer and use it in GitHub Desktop.
Test script for firefox webdriver in selenium
import subprocess,selenium.webdriver,os
subprocess.call(['killall', 'Xvfb'])
subprocess.Popen(['Xvfb', ':43','-ac','-screen','0','1024x768x16'])
os.environ["DISPLAY"]=":43"
ff = selenium.webdriver.Firefox()
ff.get('http://google.com/')
print(ff.title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment