Skip to content

Instantly share code, notes, and snippets.

@yui3880
yui3880 / gist:a63ced61806d8517c4a3
Last active August 29, 2015 14:10
save_screenshot patch
from PIL import Image
import time
def save_screenshot(self, filename, fullsize=False):
filepath = '/'.join(filename.split('/')[:-1])
if fullsize:
# ページの左上までスクロール
self.execute_script("window.scrollTo(0, 0);")
# ページサイズ取得