I am trying to learn more about HTMLunit and do some tests at the moment. I am trying to get basic information such as page name and text from this site:
https: //....com (remote full URL, the important part is https)
The code I use is what works fine on other sites:
final WebClient webClient = new WebClient(); final HtmlPage page; page = (HtmlPage)webClient.getPage("https://medeczane.sgk.gov.tr/eczane/login.jsp"); System.out.println(page.getTitleText()); System.out.println(page.asText());
Why can't I get this basic information? If this is related to security measures, what are the features and can I get around them? Thanks.
Edit: Hmm, the code stops working after webclient.getpage () ;, test2 is not written. Therefore, I cannot check if the page is null or not.
final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_2); final HtmlPage page; System.out.println("test1"); try { page = (HtmlPage)webClient.getPage("https://medeczane.sgk.gov.tr/eczane/login.jsp"); System.out.println("test2");
source share