0

I've been working on it for long duration but couldn't come across any new solution. Automating the scenarios like File Uploading (Text Box would be disabled, until & unless at least once file has been uploaded by corresponding Browse Button). Selenium+AutoIt is the only combination which is able to handle this kind of scenarios. AutoIt is not that stable & doesn't provide accuracy all times.

Is there any better way to handle scenarios like this with web-driver, Java etc (to get rid of AutoIt) ?

If AutoIt is the only way to handle it, how can we make it to provide more accuracy ?

User
  • 93
  • 1
  • 1
  • 9
  • Possible duplicate of [How to deal with file uploading in test automation using selenium or webdriver](http://stackoverflow.com/questions/6128208/how-to-deal-with-file-uploading-in-test-automation-using-selenium-or-webdriver) – JeffC Jun 29 '16 at 04:26
  • @JeffC : Solution provided at Possible duplicate of How to deal with file uploading in test automation using selenium or webdriver is not working. Sepcifically, send_keys with webdriver is not working for windows/os level dialogs. Could you please help me out ? – User Jun 29 '16 at 10:22
  • You don't sendkeys to the dialog, you sendkeys to the upload element. If you want specific help, you need to provide a specific example, show the code you are using, and what issue you are running into. – JeffC Jun 29 '16 at 12:57

1 Answers1

1

You can actually upload files using selenium by using sendKeys on the file element like this:

findElement(By.id("fileUpload")).sendKeys("/path/to/file");
Mobrockers
  • 2,128
  • 1
  • 16
  • 28