例:
from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By
driver = webdriver.Firefox()
driver.get('http://www.baidu.com')
element=driver.find_element(By.NAME,value='wd')
element.send_keys("python")
submit=driver.find_element(By.ID,value='su')
submit.click()
sleep(3)