Selenium之文件操作
from selenium import webdriver driver = webdriver.Chrome() driver.get('http://127.0.0.1/upload/1') # 输入文件的绝对路径 driver.find_element_by_id('kw').send_keys(r'D:windfile精神小伙.xls') driver.find_element_by_id('qt').click() driver.quit()
from selenium import webdriver driver = webdriver.Chrome() driver.get('http://127.0.0.1/upload/1') # 输入文件的绝对路径 driver.find_element_by_id('kw').send_keys(r'D:windfile精神小伙.xls') driver.find_element_by_id('qt').click() driver.quit()