title: Remote File Upload Protractor test
body: <p>I am writing tests in protractor which a JS based framework and selenium test stack for running tests. I am facing an issue where I have to test file upload.</p>
  
  <p>Problem I am having is File I am trying to upload is in the test package whereas selenium node is a separate server so it will not get the file.
    I tried using file descriptor although the file name is set contents don’t get uploaded.</p>
  
  <p>Below is the code snippet that I have.</p>
  
  <pre><code>  var remote = require('selenium-webdriver/remote');
     browser.setFileDetector(new remote.FileDetector());
     var absolutePath = path.resolve(__dirname, "../specs/data/baseProducts.csv");
     $('input[type="file"]').sendKeys(absolutePath);
  </code></pre>
  
  <p>Do you have any inputs for the same?
    Or do you know anyone who has written file upload tests in JS using selenium?
    Your help will be much appreciated</p>