title: HtmlUnit: Get UnexpectedPage after downloading a file
body: <p>I need to download different files in different pages with htmlUnit webDriver. I cycle on the pages and for every page I click on a input field to trigger the download.
  For the first download, I click on a HtmlInputElement (a submit button) which gives me back the file. After that, the HtmlPage becomes an UnexpectedPage. Examining the WebResponse in the UnexcpetedPage I still find the file already downloaded. 
  How to workaround?</p>
  
  <p>code:
      [...]</p>
  
  <pre><code>public void test(HtmlPage htmlPage){
      List&lt;?&gt; checkBox = htmlPage.getByXPath("//tbody[@id='TestID:ricerca_report:tb']/tr[child::td[contains(text(),'TEST')]]/td[1]/input[@type='checkbox']");
  
      for (int j = 0; j &lt; checkBox.size(); j++) {
          HtmlCheckBoxInput checked = (HtmlCheckBoxInput) checkBox.get(j);
          checked.setChecked(true);
      }
  
      writeResponseHtml(htmlPage, spOp);
      InputStream input = null;
      try{
          HtmlSubmitInput htmlSubmitInput = htmlPage.getElementByName(param.getNameAttribute());
          WebResponse webResponse = htmlSubmitInput.click().getWebResponse();
          extractOriginalFileName(webResponse, spiderInfo.getFileName());
          if( checkAndSaveFileExtension(webResponse) != null ){
              input = webResponse.getContentAsStream();
              downloadFile( input );
              spiderInfo.setFileName("work/output/spider_logs/");
          }else
              spiderInfo.setSpiderState(SpiderStates.DOWNLOAD_ERROR);
      }catch ( Exception e ){
          logger.error("getOperation download exception; " + spOp + "; Exception: " + e);
          spiderInfo.setSpiderState(SpiderStates.DOWNLOAD_ERROR);
          page = null;
      }
      writeResponseHtml(htmlPage, spOp);
      HtmlTableDataCell tableCell = htmlPage.getFirstByXPath(param.getContainsElement2());
      Page p = tableCell.click(); // Here i got the exception
  }
  
  [....]
  </code></pre>