"""
访问url
选择input框
输入文件路径
点击上传
okla
"""
import time
from selenium import webdriver
driver = webdriver.Chrome()
driver.get(url='http://127.0.0.1:8000/import_case/1')
time.sleep(2)
obj = driver.find_element_by_css_selector('input[name="excel"]')
file_path = r'C:UsersAdministratorDesktop接口测试示例.xlsx'
obj.send_keys(file_path)
time.sleep(5)
driver.find_element_by_css_selector('.btn-success').click()
time.sleep(10)
driver.quit()