#-*-coding:utf-8-*- from selenium import webdriver f = webdriver.Chrome("D:\Documents\Downloads\chromedriver.exe") f.get("http://www.baidu.com") f.find_element_by_id('kw').send_keys('selenium') f.find_element_by_id('su').click()