Created
October 20, 2016 06:21
-
-
Save ishideo/bb1c8408f9a580ac945f0a33b6444aef to your computer and use it in GitHub Desktop.
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 os | |
from selenium import webdriver | |
URL = "https://www.google.com" | |
FILENAME = os.path.join(os.path.dirname(os.path.abspath(__file__)), "screen.png") | |
browser = webdriver.PhantomJS() | |
driver = webdriver.PhantomJS() | |
driver.set_window_size(1280, 720) | |
driver.get(URL) | |
driver.save_screenshot(FILENAME) | |
driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment