How to click on 'Leave Page' button in the confirmation popup?
<p>When I try to close the browser window, I was displayed with a popup saying "This page is asking you to confirm that you want to leave-data you have entered may not be saved." with two buttons "Leave page" and "Stay on Page". I want to click on 'Leave Page'.Please let me know how can I do that. I got an answer, but it is closing the popup.</p>

<pre><code>(( JavascriptExecutor ) webDriver).executeScript( "window.close()" ); 
</code></pre>

<p>Please let me know how to resolve this.</p>