title: Handling OS Popups using Selenium Webdriver (Java)
body: <p>A reporting application has an <code>Export to Excel</code> link which upon clicking opens a OS popup similar to the one shown below. </p>
  
  <p><strong>Internet Explorer</strong></p>
  
  <p><a href="https://i.stack.imgur.com/NdWts.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NdWts.jpg" alt="Export OS Popup"></a></p>
  
  <p><strong>Firefox</strong></p>
  
  <p><a href="https://i.stack.imgur.com/IHA25.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IHA25.jpg" alt="enter image description here"></a></p>
  
  <p>I need to click on the <code>Save As</code>(IE) or <code>Save File</code>(FF) button and provide the path I need in the 'Save As' popup window and save the file. I'm aware of the <code>driver.getWindowHandle()</code> functionality but I'm not able to handle OS popups using this method.</p>
  
  <p>Please let me know if there is anyway in Selenium or in Java to handle OS popups in any browser like the above ones.</p>
  
  <p><strong>EDIT</strong>: I believe answers to <a href="https://stackoverflow.com/questions/1176348/access-to-file-download-dialog-in-firefox">this question</a> is restricted to Firefox. What I am looking for is a solution for handling this kind of native OS popups that works across all browsers (at least in IE, Chrome and Firefox)</p>