From: Filip P. <fil...@gm...> - 2018-10-03 07:02:31
|
Hello, I am new to htmlunit. I need to load page "https://www.t-mobile.cz/sms/closed.jsp" which has new JS. I cant load full page. Get result with <noscript> tag. I tried all BrowserVersion and I am using last htmlunit 2.33. My code is: ======== WebClient webClient = new WebClient(BrowserVersion.FIREFOX_60); CookieManager cookieMan = new CookieManager(); cookieMan = webClient.getCookieManager(); cookieMan.setCookiesEnabled(true); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setRedirectEnabled(true); webClient.getOptions().setCssEnabled(true); webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.getOptions().setCssEnabled(true); HtmlPage page = webClient.getPage("https://www.t-mobile.cz/sms/closed.jsp"); webClient.waitForBackgroundJavaScript(30 * 1000); String pageAsXml = page.asXml(); ======== I get debug: com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Obsolete content type encountered: 'text/javascript'. Sometimes I get debug: SEVERE: runtimeError: message=[Exceeded maximum stack depth] Is it wrong JS on a page? When I load page via Firefox, debugger gets some errors too, but the page loads fine. Any suggestions? Thank you for very much your reply. Best regards Filip |