Created
September 18, 2016 16:00
-
-
Save DavidSouther/a3f5d2b67a206406df57ac5abaf81a23 to your computer and use it in GitHub Desktop.
Obey the Testing Goat on Nitrous
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
from pyvirtualdisplay import Display | |
from selenium import webdriver | |
display = Display(visible=0, size=(800, 600)) | |
display.start() | |
browser = webdriver.Firefox() | |
browser.get('http://www.google.com') | |
print browser.title | |
browser.quit() | |
display.stop() |
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
sudo apt-get update | |
sudo apt-get install python3-pip firefox xvfb | |
sudo pip3 install --upgrade selenium pyvirtualdisplay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment