From: Ahmed A. <asa...@ya...> - 2014-08-28 13:55:20
|
Hi, Would you use 2.15, or even better the latest snapshot in http://build.canoo.com/htmlunit/ ? I get the container detailed data. Ahmed ________________________________ From: Roberto Bottoni - AfterBit <r.b...@af...> To: htm...@li... Sent: Thursday, August 28, 2014 3:38 PM Subject: [Htmlunit-user] Site table not loaded. HtmlUnit version 2.14 I'm trying to grab this page : http://m.hanjin.com/mhanjin/CUP_MOB_0802.do?menuFlag=C&searchType=C&blCntrNo=CAXU3336862 This is my code : public class Main { static final WebClient browser; static { browser = new WebClient(BrowserVersion.FIREFOX_24); browser.getOptions().setJavaScriptEnabled(true); 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[] arguments) { doTestHANJINMobile(); } private static void doTestHANJINMobile() { try { HtmlPage page = (HtmlPage) browser.getPage("http://m.hanjin.com/mhanjin/CUP_MOB_0802.do?menuFlag=C&searchType=C&blCntrNo=CAXU3336862"); System.out.println("waitForBackgroundJavaScript..."); browser.waitForBackgroundJavaScriptStartingBefore(5000); browser.waitForBackgroundJavaScript(5000); System.out.println("XML Source : \n" + page.asXml() + "\n"); } catch (Exception e) { System.out.println("EXCEPTION --------------- " + e.toString()); } } } But i get just the "Sailing Information" table and not the "Container Detail" table. I tried with other browser version ( IE, Chrome..) but nothing happens... |