title: Selenium: Saving pdf which is opened in new browser without url
body: <p>Can someone guide me how I can achieve the following:</p>
  
  <p>I am using selenium web driver java.</p>
  
  <p>Whenever I click the preview button on the webpage, the pdf is opened in a new browser and I need to save that pdf with the name given dynamically.</p>
  
  <p>So far I am able to click the preview button and a new browser is opened with the pdf. Here the browser doesn't have url.</p>
  
  <p>After the pdf is open I am sending keys control+s.</p>
  
  <p>Then save dialog window appears. I am stuck here about how to save pdf to the local drive.</p>
  
  <p>The main browser is IE  but i am trying in Firefox first</p>
  
  <p><a href="https://i.stack.imgur.com/6hmhX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6hmhX.jpg" alt="enter image description here"></a></p>