from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
driver.find_element_by_id('kw').send_keys('selenium')
driver.find_element_by_id('kw').submit()
driver.quit()
driver = webdriver.Chrome()
driver.get("http://news.baidu.com/")
driver.find_element_by_id("ww").send_keys("submit 的用法") # 这一步可以成功定位到输入框输入
print("ok1")
driver.find_element_by_id("ww").submit() # 这一步报错
print("ok2")
driver.quit()