I managed to open the window, but I can not attach the file.
from splinter import Browser
browser = Browser('firefox')
browser.visit('
http://www.freepdfconvert.com/')
browser.find_by_css('div input[type="file"]').first.click()
browser.attach_file('file', 'test.docx')
I get the following error:
Traceback (most recent call last):
File "D:/Meus documentos/python/scripts/upload/upload.py", line 10, in <module>
browser.attach_file('file', 'test.docx')
File "C:\Python27\lib\site-packages\splinter\driver\webdriver\__init__.py", line 229, in fill
field = self.find_by_name(name).first
File "C:\Python27\lib\site-packages\splinter\element_list.py", line 53, in first
return self[0]
File "C:\Python27\lib\site-packages\splinter\element_list.py", line 44, in __getitem__
self.find_by, self.query))
ElementDoesNotExist: no elements could be found with name "file"