https://www.cnblogs.com/liuhui0308/p/11960688.html
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.by import By
wd = webdriver.Chrome()
wd.get(‘https://www.baidu.com/‘)
wd.find_element(By.ID,"kw")
wd.find_element(By.NAME,"wd")
wd.find_element(By.CLASS_NAME,"s_ipt")
wd.find_element(By.TAG_NAME,"input")
wd.find_element(By.LINK_TEXT,u"新闻")
wd.find_element(By.PARTIAL_LINK_TEXT,u"新")
wd.find_element(By.XPATH,"//*[@class=‘bg s_btn‘]")
wd.find_element(By.CSS_SELECTOR,"span.bg.s_btn_wr>input#su")
原文:https://www.cnblogs.com/wenjun145/p/13029309.html