title: File Upload Feature using Selenium and java
body: <p>I need to automate the file upload feature in a web console and i am using selenium and java for this.
  I tried multiple approaches but when i click on upload button and windows explorer gets opened, it stops there.
  doesn't select any file...and gives error that there is no file..
  I tried in firefox and chrome both but i am not able to solve this problem.</p>
  
  <p>Then i also tried AutoIt tool. I downloaded it and made a script. trying to compile my script i am getting this error:</p>
  
  <p>Code I'm using:</p>
  
  <pre><code>WebDriver driver = new FirefoxDriver(); 
  driver.get("localhost:8080/page"); 
  WebElement selectUploadApk = driver.findElement(By.id("id of upload button"));
  selectUploadApk.click();
  WebElement file = driver.findElement(By.xpath("//input[@type='file']")); 
  file .sendKeys("path of the file");
  </code></pre>
  
  <p>Error: Unable to execute upx.exe to compress stub file 
  File not found Exception</p>
  
  <p>Please help</p>
  
  <p>Thanx in advance</p>
  
  <p>Megha</p>