title: File Upload using Selenium WebDriver and Java Robot Class
body: <p>I am using Selenium WebDriver and Java and I need to automate the file upload feature. I tried a lot, but the moment the Browse button is clicked and a new window opens the script stops executing further and rather getting stuck. I tried in both FireFox and IE driver but to no avail.</p>
  
  <p>I tried also by calling an autoit exe file, but as the new window opens on click of Browse button, the particular statement </p>
  
  <pre><code>Runtime.getRuntime().exec("C:\\Selenium\\ImageUpload_FF.exe")
  </code></pre>
  
  <p>couldn't be exeuted. Kindly help</p>