# -*- coding: utf-8 -*-
from os.path import dirname, abspath
import sys
from selenium import webdriver
filePath = dirname(abspath(__file__))
print(filePath)
driver = webdriver.Firefox()
driver.get('http://sahitest.com/demo/php/fileUpload.htm')
upload = driver.find_element_by_id('file')
# driver.get('https://pan.baidu.com/disk/home?#/all?path=%2F&vmode=list')
# upload = driver.find_element_by_id('h5Input1')
upload.send_keys(filePath + '\\异常.py') # send_keys
print(upload.get_attribute('value'))# check value
driver.quit()