title: using rendered page links via java client
body: <p>I am given a url , I need to get this url html and from there get this site links . 
  I thought about using headless browsers . I m using java so I would like to sum it up using java process.<br>
  an example can be cnn site ... 
  So far I have tried using :</p>
  
  <blockquote>
    <p>testCompile 'net.sourceforge.htmlunit:htmlunit:2.32'</p>
  </blockquote>
  
  <pre><code>   @Test
       public void htmlUnitTest() throws Exception {
  
        try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) {
  
          webClient.waitForBackgroundJavaScriptStartingBefore(20000);
          webClient.getOptions().setThrowExceptionOnScriptError(false);
  
          final HtmlPage page = webClient.getPage(URL);
          WebResponse response = page.getWebResponse();
          String content = response.getContentAsString();
  
          List&lt;HtmlAnchor&gt; anchors = page.getAnchors();
  
          System.out.println("anchors.size() : " + anchors.size());
          System.out.println("***********");
          System.out.println(content);
          System.out.println("***********");
  
          try (BufferedWriter writer = new BufferedWriter(new FileWriter("htmlUnit.txt"))) {
              writer.write(content);
          }
      }
  }
  </code></pre>
  
  <p>but the response I am getting the original HTML without being rendered (the java script havent worked and created the page anchors in my case ) </p>
  
  <p>can someone recommend on another library , or tell me if I miss using html unit and can suggest a working solution it will be very helpful. </p>