A java GUI-Less browser, which allows high-level manipulation of web pages, such as filling forms and clicking links; just getPage(url), find a hyperlink, click() and you have all the HTML, JavaScript, and Ajax are automatically processed.
Hi,
I have been using HTMLUnit version 2.15 successfully for some time.
However, a few days ago, my solution stopped working.
For some reason the site is not loaded as it should.
I have already tried to update the version of HTMLUNIT to the latest but unsuccessfully.
cookies, no content ... What is wrong !?
THE CODE....
WebClient webClient = new WebClient();
webClient.getOptions().setUseInsecureSSL(true);
webClient.getOptions().setCssEnabled(false);
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getOptions().setAppletEnabled(false);
webClient.getOptions().setActiveXNative(false);
webClient.getOptions().setGeolocationEnabled(false);
webClient.getOptions().setPopupBlockerEnabled(true);
webClient.getOptions().setRedirectEnabled(false); //Evita o carregamento desnecessário de paginas
webClient.getOptions().setTimeout(TIMEOUT);
webClient.getOptions().setPrintContentOnFailingStatusCode(false);
webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
webClient.getOptions().setThrowExceptionOnScriptError(false);
Hi,
I have been using HTMLUnit version 2.15 successfully for some time.
However, a few days ago, my solution stopped working.
For some reason the site is not loaded as it should.
I have already tried to update the version of HTMLUNIT to the latest but unsuccessfully.
cookies, no content ... What is wrong !?
THE CODE....
WebClient webClient = new WebClient();
webClient.getOptions().setUseInsecureSSL(true);
webClient.getOptions().setCssEnabled(false);
webClient.getOptions().setJavaScriptEnabled(true);
WebRequest requestSettings = new WebRequest(new URL("http://cadastro.saude.gov.br"), HttpMethod.GET);
Page page = webClient.getPage(requestSettings);
WebResponse response = page.getWebResponse();