Meta -
OS: OSX
Selenium Version: 2.51.0
Browser: Google Chrome
Browser Version: 50.0.2661.94 (64-bit)
Chromedriver Version: 2.21.371459
Expected Behavior -
CSV files inputted to the file input field (using send_keys) should have their content_type text/csv
Actual Behavior -
They are of the content type application/octet-stream
, so if the field is validated to accept only certain types (text/csv'
or 'application/vnd.ms-excel'
) in my case, the file will fail to upload
Steps to reproduce -
- Use selenium to navigate to a page that has an input field of the type
file
- use
send_keys
to fill out the input field with the path to the file
- Verify the content_type of the uploaded file
I can provide a more detailed example if needed.