案例:在百度搜索上传本地图片进行搜索。
from selenium import webdriver
from time import sleep
driver=webdriver.Firefox()
driver.get("http://www.baidu.com")
driver.find_element_by_css_selector(".soutu-btn").click()
sleep(3)
driver.find_element_by_css_selector(".upload-pic").send_keys(r"E:\Python_script\Webdriver\shuiyin.png")
sleep(3)
# driver.quit()
标签:文件,driver,sleep,import,上传,find,css
From: https://www.cnblogs.com/hahaniuer/p/17055507.html