Upload file to hidden input using protractor and selenium
问题 I've got a hidden file input field like this: <input type="file" id="fileToUpload-1827" multiple="" onchange="angular.element(this).scope().setFiles(this)" data-upload-id="1827" class="hidden-uploader"> I'd like to be able to upload files to this. The normal way to do this in protractor would be to do: ptor.findElement(protractor.By.css('.file-upload-form input')).sendKeys('/path/to/file') But because the input element isn't visible, I get an error. I tried: ptor.driver.executeScript("return