Ghost.py
Ghost.py copied to clipboard
Uploading files on an input multiple field results in a dialog.
Usually, Ghost.py should intercept file uploads like these:
ghost.set_field_value('input[name=file]', '/tmp/test.txt')
This works with <input name="file" type="file" />
, but not with <input name="file" type="file" multiple />
. The latter will trigger a file open dialog. The reason being that the overridden chooseFile
method is never called, apparently because that's done differently. See http://stackoverflow.com/questions/22558873/python-pyqt4-webkit-how-to-set-value-of-inputtype-file-multiple