from selenium import webdriver driver = webdriver.Chrome() driver.get("http://www.baidu.com") # by link 定位 driver.find_element_by_link_text("新闻").click() # by partial link text定位 driver.find_element_by_partial_link_text('新').click driver.quit()