Watai icon indicating copy to clipboard operation
Watai copied to clipboard

File inputs should be settable through magic setters

Open MattiSG opened this issue 12 years ago • 0 comments

Considering a widget with a fileField element being an <input type="file">, this.setFileField(filePath) does not work because it fails on the clear, leading to the need for this workaround:

upload: function upload(filePath) {
    return this.fileField.then(function(fileField) {
        return fileField.sendKeys(filePath);
    }
}

MattiSG avatar Oct 11 '13 13:10 MattiSG