title: Uploading a file with Nightwatch and Browser Stack / Selenium Grid
body: <p>I'm trying to upload a file in a nightwatch test that is being run on Browserstack in IE11. Here is what I have:</p>
  
  <pre><code>browser.execute(function (data) {
    const el = document.querySelector('input#fileUpload');
    el.style.display = "block";
    el.removeAttribute('multiple');
  }, []);
  
  browser.setValue('input#fileUpload', require('path').resolve(__dirname + '/upload-files/test-doc.pdf'))
  </code></pre>
  
  <p>The error is a file not found issue, it works fine when being run on Chrome locally. Searching around, it seems like I need to upload the file to BS first, I found this <a href="https://gist.github.com/Bunk/6c384fbe15556f7702d32aa8aa7a7521" rel="nofollow noreferrer">gist</a> and this <a href="https://github.com/nightwatchjs/nightwatch/issues/890" rel="nofollow noreferrer">PR</a> but neither worked for me.</p>