Skip to content

Instantly share code, notes, and snippets.

@joetde
Last active July 20, 2018 13:24
Show Gist options
  • Save joetde/0d6c31bed94abf5448cc to your computer and use it in GitHub Desktop.
Save joetde/0d6c31bed94abf5448cc to your computer and use it in GitHub Desktop.
Because
#!/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