Autoit is not working | Selenium Forum
M
Posted on 17/07/2016
I compiled your below code and it does not give me temp.exe on my desktop. It gives me only temp and when i run it, it does not take me to "File Upload" page.

I feel like you skipped some steps in your video because I dont see where you specify the code for the url and clicking the button to browse the file
driver.get("http://qtpselenium.com/test/uploadform/contactform.php");
driver.findElement(By.xpath("//*[@id='photo']")).sendKeys("C:\\maximize.png");

what am i missing?

M
Replied on 18/07/2016

there are 2 ways to upload a file

1.)driver.get("http://qtpselenium.com/test/uploadform/contactform.php");
driver.findElement(By.xpath("//*[@id='photo']")).sendKeys("C:\\maximize.png");


but this doesn't always work.
so, second method is used.

2.)click on choose file with selenium and then call auto it via java.