实现功能
拖拽图片到百度上传图片搜索功能区域。
定位.send_keys(r'图片路径')
导入相关包
from selenium import webdriver
from time import sleep
打开百度
driver=webdriver.Chrome()
driver.get('http://www.baidu.com')
定位+按钮
driver.find_element_by_class_name('soutu-btn').click()
sleep(1)
打开指定位置的图片
driver.find_element_by_class_name('upload-pic').send_keys(r'F:wxPyCharm Community Edition 2018.1.3zdh1.jpg')