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.
Then i also tried AutoIt tool. I downloaded it and made a script. trying to compile my script i am getting this error:
Code I'm using:
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");
Error: Unable to execute upx.exe to compress stub file File not found Exception
Please help
Thanx in advance
Megha