Last active
December 14, 2015 16:49
-
-
Save phihag/5117914 to your computer and use it in GitHub Desktop.
Test script for firefox webdriver in selenium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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