Last active
July 20, 2018 13:24
-
-
Save joetde/0d6c31bed94abf5448cc to your computer and use it in GitHub Desktop.
Because
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
#!/usr/bin/python | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from time import sleep | |
driver = webdriver.Firefox() | |
driver.get('http://10fastfingers.com/typing-test/english') | |
def write_words(): | |
text = driver.find_element_by_id('inputfield') | |
for row in driver.find_element_by_id('row1').find_elements_by_tag_name('span'): | |
text.send_keys(row.text) | |
text.send_keys(Keys.SPACE) | |
sleep(0.3) | |
write_words() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment