Generally, we scrap the data from websites using WebDriver with Java. During that scraping, if I want to download something (i.e XML file Download), there is a browser popup. Please help me know how to handle this browser popup using Java
<a href="javascript:downloadXML()">
<img width="40" height="20" border="0" name="imag34" alt="Download" src="/pair/img/tabs/downloadxml.gif">
</a>
I am using the following code to click the image
driver.findElement(By.xpath("(//img[@alt='Download'])[3]")).click();
After clicking the image, it will open a "Save as.." popup. How do we go to that popup window and handle it?