From: Ahmed A. <asa...@ya...> - 2015-08-24 01:59:01
|
Hi Roberto, I tried with latest snapshot/build [1], and no error occurs. Ahmed [1] https://ci.canoo.com/teamcity/viewLog.html?buildTypeId=HtmlUnit_FastBuild&buildId=lastSuccessful&tab=artifacts From: Roberto Bottoni - AfterBit <r.b...@af...> To: htm...@li... Sent: Thursday, August 20, 2015 1:42 PM Subject: [Htmlunit-user] ScriptException: Exceeded maximum stack depth Hi Ahmed! When i try to get this page https://www.hapag-lloyd.com/en/tracing/by_container.html , I get an error and the page cannot be displayed HtmlUnit 2.18 and JDK 1.7 This is the code : import com.gargoylesoftware.htmlunit.*; import com.gargoylesoftware.htmlunit.html.HtmlPage; public class HtmlUnitTest { static final WebClient browser; static { browser = new WebClient(BrowserVersion.CHROME); browser.getOptions().setJavaScriptEnabled(true); browser.setAjaxController(new NicelyResynchronizingAjaxController()); CookieManager cookieMan = new CookieManager(); cookieMan = browser.getCookieManager(); cookieMan.setCookiesEnabled(true); browser.getOptions().setRedirectEnabled(true); browser.getOptions().setThrowExceptionOnFailingStatusCode(false); browser.getOptions().setPrintContentOnFailingStatusCode(true); browser.getOptions().setThrowExceptionOnScriptError(false); } public static void main(String[] args) { doTestHapag(); } private static void doTestHapag() { try { HtmlPage page = (HtmlPage) browser.getPage("https://www.hapag-lloyd.com/en/tracing/by_container.html"); browser.waitForBackgroundJavaScript(5000); } catch (Exception e) { System.out.println("EXCEPTION --------------- " + e.toString()); } } } |