title: Protractor - upload file/ running exe via protractor
body: <p>I have a web site written in Angular and I'm trying to do end-to-end testing 
  using Protractor. The website has a "add button", that opens "choose file dialog box". I want to be able add a file from protractor, but it doesn't upload the file or closes the dialog box.</p>
  
  <p>I tried to create a <code>.exe</code> file that controls the dialog box via (autoIt) and it works fine (when the dialog box pop up i run the <code>.exe</code> and everything is working fine). However, I don't understand how to tell the protractor to launch an <code>.exe</code> after the dialog box appears.</p>
  
  <pre><code> var path = require('path');
   it('should upload a file', function() {
       var fileToUpload = '...\folder\xxx.txt',
       absolutePath = path.resolve(__dirname, fileToUpload);
       $('#uploadButton').click();
       $('input[type="file"]').sendKeys(absolutePath);
   });
  </code></pre>
  
  <hr>
  
  <pre><code>var exec = require('child_process').execFile;
  var fun = function() {
      console.log("fun() start");
      exec('c:\\Upload_Nonce.exe', function(err, data) {  
          console.log(err)
          console.log(data.toString());                       
      });  
  }
  fun(); 
  </code></pre>