From: guich <gu...@su...> - 2020-02-09 14:16:19
|
Hi, I'm trying to invoke the following ahref using HtmlUnit. <li> Create <#> The code i'm using is: try (final WebClient webClient = new WebClient(BrowserVersion.CHROME)) { webClient.setAjaxController(new NicelyResynchronizingAjaxController()); // webClient.setCssErrorHandler(new SilentCssErrorHandler()); webClient.getOptions().setUseInsecureSSL(true); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setCssEnabled(false); webClient.waitForBackgroundJavaScript(10000); // webClient.getOptions().setThrowExceptionOnScriptError(false); ... HtmlListItem item = (HtmlListItem)spans.get(idx3); HtmlAnchor a = (HtmlAnchor)item.getFirstElementChild(); System.out.println("a: "+a); HtmlPage pag3 = item.click(); System.out.println(pag3); } This is not working: the returned page is the same one. -- Sent from: http://htmlunit.10904.n7.nabble.com/HtmlUnit-General-f20847.html |