Skip to content

Instantly share code, notes, and snippets.

@kurozumi kurozumi/execute_script.py

Last active Feb 24, 2016
Embed
What would you like to do?
【Selenium】How to scroll down to the bottom of a page
# coding: utf-8
from selenium import webdriver
# FireFox起動
driver = webdriver.Firefox()
# yahoo表示
driver.get('http://www.yahoo.co.jp/')
# javascriptを実行してページの最下部へ移動
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
# FireFox終了
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.