-1

I have to upload a .JPG image from a specified folder. Sendkeys(PATH) is not working. The robot is also not working. Please suggest me some other tool like Robot where I can use its .jar files in my maven project. I have to run the code on the server using grid so no installers, please. Any external or internal Java class would be great.

Shubham Jain
  • 14,804
  • 9
  • 73
  • 115
Sujay
  • 139
  • 1
  • 9
  • have u tried sikuli? It has its own API's which can be used along with selenium. http://doc.sikuli.org/faq/030-java-dev.html – nitin chawda Mar 30 '15 at 11:52
  • sikuli requires an install, and won't work if running the tests headless on the server. Integrating sikuli into selenium tests can, at times, be the only option, but it invariably does cause tests to become more brittle and less portable. – aholt Mar 30 '15 at 13:51

1 Answers1

0

Take a look at my answer here. The code is in C#, but it outlines the workaround I used for uploading files inside a selenium test. Note: no third-party tools were required.

Community
  • 1
  • 1
aholt
  • 2,669
  • 2
  • 9
  • 13