How to upload csv file through Protractor
it('upload file', function(){
var fileToUpload = 'C:/Users/Anusha/Desktop/demo.csv';
var absolutePath = path.resolve(fileToUpload);
var button = element(by.css('[ng-file-select]');
button.click();
var input = element(by.css('input[type="file"]'));
input.sendKeys(absolutePath);
});
Are there any code examples left?
New code examples in category Other