Answers for "How to upload csv file through Protractor"

1

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);
});
Posted by: Guest on July-02-2020

Code answers related to "How to upload csv file through Protractor"

Browse Popular Code Answers by Language