1

I have a question regarding how to deal with an OS specific pop up window (in this case Windows) and if it is possible to access the elements in them for things such as photo uploads, document uploads, etc. So say if I have an "Add Photo" button and I click it, it will then lead me to a window like this..

enter image description here

So I am wondering if there is a way i can just do element.sendKeys(absolute path url) for the File Name.. Has anyone had success with something like this? Thanks!

Tree55Topz
  • 1,102
  • 4
  • 20
  • 51
  • possible duplicate of [How to handle windows file upload using selenium webdriver?](http://stackoverflow.com/questions/11256732/how-to-handle-windows-file-upload-using-selenium-webdriver) – JeffC Aug 25 '15 at 18:28

1 Answers1

0

Yes you are able to sendKeys() to the actual button for example:

WebElement button = driver.findElement(by.id("buttonId"));
button.sendKeys(pathToFile);
Jamie Rees
  • 7,973
  • 2
  • 45
  • 83