I am trying to download xls file for a website. When I click the link to download the file, I get a javascript confirm box. I handle it like below
ConfirmHan
I found a way to get InputStream using WebWindowListener. Inside of webWindowContentChanged(WebWindowEvent event), I put code below.
InputStream xls = event.getWebWindow().getEnclosedPage().getWebResponse().getContentAsStream();
After I get xls, I could save the file into my hard disk.