http://pastebin.com/uQSW5iwZ here's the part of the code which I would like to change. I don't know how to get the following line to not "Timeout" and instead continue onwards to printTweet(driver) elem = WebDriverWait(driver,10).until(EC.visibility_of_element_located((By.CSS_SELECTOR,lastTweetCss)))