from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Firefox()
driver.get("https://www.baidu.com")
# element = WebDriverWait(driver, 5, 0.5).until(EC.presence_of_element_located((By.ID, "kw")))
WebDriverWait(driver, 1, 0.5).until_not(lambda x: x.find_element_by_xpath('//*[@]').send_keys("Seleniumm"), "出错了")
driver.quit()