【Python】Seleniumを使って標準入力で指定した回数分だけF5キーを押す方法
This file contains 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
# coding: utf-8 | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
cnt = raw_input() | |
driver = webdriver.Firefox() | |
driver.get("http://www.yahoo.co.jp") | |
for i in range(0, int(cnt)): | |
driver.find_element_by_tag_name("body").send_keys(Keys.F5) | |
driver.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment